Sunday, April 3, 2022

Basic PowerShell Commands

Get Execution Policy

Get-ExecutionPolicy

Set Execution Policy to Unrestricted

Set-ExecutionPolicy Unrestricted

Show PowerShell Version

$PSVersionTable

Get help for a command
Use this to get the help information for a command
Get-Help <cmdlet-name>

Search Get Help
Use this to search the help files. This is useful if you don’t know the command or want to see if one exists.
Get-Help *keyword*

Get Installed Modules
Use this command to display all the installed modules on a computer 
Get-InstalledModule

List All Available Modules
This will list all available modules on the computer.
Get-Module -ListAvailable

Get Installed Modules
Use this command to display all the installed modules on a computer
Get-Module -ListAvailable

Display available commands
This will display all commands that are available based on the modules that are loaded.
Get-Command