You can’t work with powershell until you know your cmdlet.

Discovering what cmdlet to be used is key in working with Powershell, unless you know what is the command you can’t fire it to get the resuts.

Powershell provides very useful discovery tool for users to discover the cmdlets that you have access to, you just need to use below command in following fashion:

Get-Command *Keyword*

EXAMPLE :

Suppose I want to search Event logs on a machine through powershell, but I don’t know if powershell library supports any cmdlet related to Event logs, So I’ll use Get-Command Cmdlet with keyword and Wildcards (‘*’) to explore the command, like –

Get-Command *Event*

Which will give me following results.

gcm

Once you have your cmdlets you can Use Get-Help Cmdlet to explore that specific Cmdlet, like this :

Get-Help Get-EventLog -Full

gcm

Well, there are some great ways to use the keywords and Wildcards to get the exact results, like –

gcm

Happy Reading Friends 🙂