so…you need to perform some script or command ,but you don’t know the words …and how
to express yourself , don’t worry ! we have solution for it via Powershell .. or Google( 🙂 )
we can find commands and get to know and explore all of them with powershell command named : ‘Get-Command‘ aka “Mother of Commands..”
if we’ll simply enter the command on console we will get all the commands, functions ,alias & cmdlets  installed and recognize on the system.
which means that if we’ve installed and imported External Module ,for example Active Directory then we’ll get all the commands belongs to this module as well.
we can filter the results by Commands Type like cmdlet / function or from which module it came from..
Get All The Commands –
1 |
Get-Command |
Some Filters ..
Filter by Name –
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
PS C:\> Get-Command -Name *service* CommandType Name ModuleName ----------- ---- ---------- Function Get-SMServerService ServerManagerTasks Cmdlet Add-ADComputerServiceAccount ActiveDirectory Cmdlet Get-ADComputerServiceAccount ActiveDirectory Cmdlet Get-ADServiceAccount ActiveDirectory Cmdlet Get-Service Microsoft.PowerShell.Manag... Cmdlet Install-ADServiceAccount ActiveDirectory Cmdlet New-ADServiceAccount ActiveDirectory Cmdlet New-Service Microsoft.PowerShell.Manag... Cmdlet New-WebServiceProxy Microsoft.PowerShell.Manag... Cmdlet Remove-ADComputerServiceAccount ActiveDirectory Cmdlet Remove-ADServiceAccount ActiveDirectory Cmdlet Reset-ADServiceAccountPassword ActiveDirectory Cmdlet Restart-Service Microsoft.PowerShell.Manag... Cmdlet Resume-Service Microsoft.PowerShell.Manag... Cmdlet Set-ADServiceAccount ActiveDirectory Cmdlet Set-Service Microsoft.PowerShell.Manag... Cmdlet Start-Service Microsoft.PowerShell.Manag... Cmdlet Stop-Service Microsoft.PowerShell.Manag... Cmdlet Suspend-Service Microsoft.PowerShell.Manag... Cmdlet Uninstall-ADServiceAccount ActiveDirectory Application ControlService.exe Application Microsoft.AnalysisServices.Deployment.exe Application services.exe Application services.msc |
Filter by Noun –
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
PS C:\> Get-Command -Noun *service* CommandType Name ModuleName ----------- ---- ---------- Function Get-SMServerService ServerManagerTasks Cmdlet Add-ADComputerServiceAccount ActiveDirectory Cmdlet Get-ADComputerServiceAccount ActiveDirectory Cmdlet Get-ADServiceAccount ActiveDirectory Cmdlet Get-Service Microsoft.PowerShell.Manag... Cmdlet Install-ADServiceAccount ActiveDirectory Cmdlet New-ADServiceAccount ActiveDirectory Cmdlet New-Service Microsoft.PowerShell.Manag... Cmdlet New-WebServiceProxy Microsoft.PowerShell.Manag... Cmdlet Remove-ADComputerServiceAccount ActiveDirectory Cmdlet Remove-ADServiceAccount ActiveDirectory Cmdlet Reset-ADServiceAccountPassword ActiveDirectory Cmdlet Restart-Service Microsoft.PowerShell.Manag... Cmdlet Resume-Service Microsoft.PowerShell.Manag... Cmdlet Set-ADServiceAccount ActiveDirectory Cmdlet Set-Service Microsoft.PowerShell.Manag... Cmdlet Start-Service Microsoft.PowerShell.Manag... Cmdlet Stop-Service Microsoft.PowerShell.Manag... Cmdlet Suspend-Service Microsoft.PowerShell.Manag... Cmdlet Uninstall-ADServiceAccount ActiveDirectory |
Filter by type of installed Module –
1 2 3 4 5 6 7 8 9 |
PS C:\> Import-Module ActiveDirectory PS C:\> Get-Command -Module ActiveDirectory CommandType Name ModuleName ----------- ---- ---------- Cmdlet Add-ADComputerServiceAccount ActiveDirectory Cmdlet Add-ADDomainControllerPasswordReplicationPolicy ActiveDirectory Cmdlet Add-ADFineGrainedPasswordPolicySubject ActiveDirectory |