Gets information about Windows Server roles, role services, and features that are available for installation and installed on a specified server.
Windows Server · Risk: Low · Documentation Verified
Last verified: 2026-10-26
Microsoft Microsoft.Windows.ServerManager.Migration reference: Gets information about Windows Server roles, role services, and features that are available for installation and installed on a specified server. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Get-WindowsFeature. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / Microsoft.Windows.ServerManager.Migration · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-ComputerName
Specifies a list of available rrsandf_plural from the specified remote computer that is running Windows Server 2012 R2. The parameter accepts only one computer name. If this parameter is not added, or no computer name is specified, the default target is the local computer. Valid values for the parameter include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN) of a remote computer. To use a remote computer's IP address as the value of this parameter, your command must include the *Credential* parameter. The computer must either be configured for HTTPS transport, or the IP address of the remote computer must be included in the WinRM TrustedHosts list on the local computer. For information about adding a computer name to the WinRM TrustedHosts list, see How to Add a Computer to the Trusted Host List in about_Remote_Troubleshooting.
-Credential
Specifies a user account that has access rights to perform this action. If the parameter is not added, or no value is specified, the default value of this parameter is the current user. Enter a user name in one of the following formats. Quotation marks are optional. -- "UserName" -- "Domain\User" -- "User@Domain.com" -- A Credential object returned by the Get-Credential cmdlet. If a user name is entered, then a prompt for a password is displayed.
-LogPath
Specifies a name and path to a log file. Use this parameter if the results of this cmdlet must be stored in a log.
-Name
Specifies an array of command IDs of roles, role services, or features from which this cmdlet returns information.
-Vhd
Specifies the path to an offline virtual hard drive (VHD). The path can either point to a VHD file, or to a location on which the VHD is already mounted by using Deployment Image Servicing and Management (DISM) tools. The VHD can be on a local disk on the target computer, or on a network shared folder. If the VHD is in a network shared folder, then the value of this parameter is a UNC path to the VHD. In this case, the computer account of the computer that you are using to mount the VHD must have read and write permissions (Read/Write permissions in the File Sharing dialog box, or Full Control on the Security tab of the folder Properties dialog box) on the shared folder, or the VHD will not be accessible. Local loopback UNC paths are not supported. Use either of the following formats for the computer account: DOMAIN\SERVERNAME$ or SERVERNAME$. Add the *ComputerName* parameter to specify the target computer you want to use to mount the VHD. If the *ComputerName* parameter is not specified, then the local computer is used. The computer that you are using to mount the VHD must be running Windows Server 2012 R2. Any local path, such as D:\myFolder, that is specified by using this parameter is always relative to the target computer.
Prerequisites
Windows with the Microsoft.Windows.ServerManager.Migration module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This is a read-oriented cmdlet; protect any sensitive results and check the documented effects of your selected parameters.
Examples
Example 1: Get a list of features that are available and installed on the specified computer
This command gets a list of features that are available and installed on the target computer named Server1. The credentials for user user1 in the Contoso.com domain, a user who has Administrator rights on Server1, are provided. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.