Difference between revisions of "Powershell Fundamentals"

From rbachwiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 21: Line 21:
  help About* // * list all about files or you could do help with about name to list just that file
  help About* // * list all about files or you could do help with about name to list just that file
  Update-Help // Will update the help files on the system
  Update-Help // Will update the help files on the system
== Finding Commands ==
Get-Command *user* // find commands that has user in the name
Find-Command
<p class="high"> Options:  -tag NTFS // Find command goes out to the internet </p>
Show-Command // will pop up a GUI box
Show-Command Get-Hotfix
==Modules ==
Get-Module // show what's loaded in this session
Get-Module -ListAvailable /// show what modules are available
Find-Module Az
Install-Module // then the name of the module to install
Update-Module // to update
Uninstall-Module // to uninstall
===[https://www.powershellgallery.com PowerShell Gallery; Repository for sharing and acquiring PowerShell code including modules , scripts and DSC resources]===
==[[Main_Page| Home]] - [[PowerShell|Category]]==

Latest revision as of 17:39, 17 October 2024

Get Version

$PSVersionTable

Get Log of session

Start-Transcript // will start a log transcript of everything that is typed
Stop-Transcript // stop the transcript
transcript file is stored in My Documents

Keyboard Shortcut

ALT-SHIFT + (PLUS)  // Split panes horizontally (WILL NOT WORK WITH THE NUMBER KEYPAD)
ALT-SHIFT - (MINUS) // Split panes vertically (WILL NOT WORK WITH THE NUMBER KEYPAD)
CTRL + To zoom in
CTRL - To Zoom Out
ALT Arrows will jump from one pane to the next
ALT Shift Arrows will resize panes
CTRL SHIFT W Closes Panes

Help

Use Help followed by the service name

Help Get-Service
Help Get-service -ShowWindow
Help Get-Service -Examples
help About* // * list all about files or you could do help with about name to list just that file
Update-Help // Will update the help files on the system

Finding Commands

Get-Command *user* // find commands that has user in the name
Find-Command

Options: -tag NTFS // Find command goes out to the internet

Show-Command // will pop up a GUI box
Show-Command Get-Hotfix

Modules

Get-Module // show what's loaded in this session
Get-Module -ListAvailable /// show what modules are available
Find-Module Az
Install-Module // then the name of the module to install
Update-Module // to update
Uninstall-Module // to uninstall

PowerShell Gallery; Repository for sharing and acquiring PowerShell code including modules , scripts and DSC resources

Home - Category