Wednesday, August 17, 2016

PowerShell - Start here

List all cmdlets:

Get-Command

List all commands that retrieve information:

Get-Command Get*

List all commands having to do with SQL:

Get-Command *sql*

List all commands having to with services:

Get-Command *service*

Show all services:

Get-Service

Restarts the browser service:

Restart-Service browser

Gets documentation on specified cmdlet - in this case, get-service:

Get-Help get-service

Cmdlets can be interacted with by calling methods and setting or retrieving properties. By piping the output of Get-Service to Get-Member we can see all the methods and properties available from Get-Service:

Get-Service | Get-Member



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.