Author : HASSAN MD TAREQ | Updated : 2021/09/09

Command Structure

#
# Get-Command cmdlet included in PowerShell is used to get all the cmdlets that are registered in the command shell
#
Get-Command
Get-Command -Noun Variable

#
# Getting help about cmdlet
#
# Get-Help <cmdlet-name>
#
Get-Help Start-Service -Full
Get-Help Start-Service -Parameter *

Details: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_command_syntax

Variable in Script

#
# User defined variable
#
$FooBarBaz = "foo-bar-baz"

#
# Automatic variable
#
$version = $PSVersionTable.PSVersion

Details: Variables in PowerShell