PowerShell Tip – How to find all cmdlets with specific parameter?


Do you want to find all cmdlets with specific parameter? Since Windows PowerShell 3.0 you can use Get-Command -ParameterName.

PS C:\Windows\system32> gcm -ParameterName Domain
CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Cmdlet          Add-Computer                                       Microsoft.PowerShell.Management

But do not forget to import modules that should be searched.

PS C:\Windows\system32> ipmo ActiveDirectory, GroupPolicy
PS C:\Windows\system32> gcm -ParameterName Domain
CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Alias           Get-GPPermissions                                  GroupPolicy
Alias           Set-GPPermissions                                  GroupPolicy
Cmdlet          Add-Computer                                       Microsoft.PowerShell.Management
Cmdlet          Backup-GPO                                         GroupPolicy
Cmdlet          Get-ADReplicationFailure                           ActiveDirectory
Cmdlet          Get-ADReplicationPartnerMetadata                   ActiveDirectory
Cmdlet          Get-ADReplicationUpToDatenessVectorTable           ActiveDirectory
Cmdlet          Get-GPInheritance                                  GroupPolicy
Cmdlet          Get-GPO                                            GroupPolicy
Cmdlet          Get-GPOReport                                      GroupPolicy
Cmdlet          Get-GPPermission                                   GroupPolicy
Cmdlet          Get-GPPrefRegistryValue                            GroupPolicy
Cmdlet          Get-GPRegistryValue                                GroupPolicy
Cmdlet          Get-GPStarterGPO                                   GroupPolicy
Cmdlet          Import-GPO                                         GroupPolicy
Cmdlet          New-GPLink                                         GroupPolicy
Cmdlet          New-GPO                                            GroupPolicy
Cmdlet          New-GPStarterGPO                                   GroupPolicy
Cmdlet          Remove-GPLink                                      GroupPolicy
Cmdlet          Remove-GPO                                         GroupPolicy
Cmdlet          Remove-GPPrefRegistryValue                         GroupPolicy
Cmdlet          Remove-GPRegistryValue                             GroupPolicy
Cmdlet          Rename-GPO                                         GroupPolicy
Cmdlet          Restore-GPO                                        GroupPolicy
Cmdlet          Set-GPInheritance                                  GroupPolicy
Cmdlet          Set-GPLink                                         GroupPolicy
Cmdlet          Set-GPPermission                                   GroupPolicy
Cmdlet          Set-GPPrefRegistryValue                            GroupPolicy
Cmdlet          Set-GPRegistryValue                                GroupPolicy

Leave a Reply

Your email address will not be published. Required fields are marked *

Active Directory Advanced function AlwaysOn Availability Groups AlwaysOn Failover Cluster Instances Building Cloud Cloud Cluster Cmdlet Database Deployment Design DFS Domain Controller DSC Fabric Failover Clustering File Server Group Policy Hardware Profile Host Hyper-V Installation Library Library Asset Library Server Network Operations Manager Orchestrator PowerShell PowerShell User Group PowerShell Workflow Security Service Manager SQL Server Storage System Center Template Time Time Synchronization Tips Virtual Machine Virtual Machine Manager VM Network VM Template Windows Server 2012 R2