IT-info

PowerShell

Links

PowerShell (Wikipedia)

PowerShell (MSDN)
PowerShell Team Blog
Hey, Scripting Guy! Blog (Microsoft TechNet)
PowerShellMagazine

Installera olika versioner av PowerShell
PowerShell Core 6.0: Generally Available (GA) and Supported!
Installera PowerShell Core i Windows, Distribuera på Windows IoT

Update-Help
Understanding and Using Updatable PowerShell Help
Get-Help, Update-Help, Save-Help - Mastering Help in PowerShell
Improving the output of Update-Help
Update-Module

Understanding a Windows PowerShell Module
Popular PowerShell Modules

PowerShell Gallery

Useful commands

Check what version of PowerShell you're using

$Host.Version

or

$PSVersionTable.PSVersion

Update PowerShell using winget

winget search Microsoft.PowerShell

Output should look something like the example below:

Name               Id                           Version Source
---------------------------------------------------------------
PowerShell         Microsoft.PowerShell         7.5.2.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.6.0.4 winget

winget install --id Microsoft.PowerShell --source winget

winget install --id Microsoft.PowerShell.Preview --source winget

More info: Installing PowerShell on Windows

Misc. info

Question: How can I see all of the Help examples for cmdlets from a specific module?

Answer: After you have updated your Help in Windows PowerShell 3.0, use the Get-Command cmdlet to retrieve all cmdlets from a specific module, pipe the results to the Foreach-Object cmdlet, and use the Get-Help cmdlet inside the script block. Following is an example for the PrintManagement module:

Get-Command -Module PrintManagement| Foreach-Object {get-help $_.name -Examples}

Here is a shorter version of the same command:

gcm -mo *print* | % {get-help $_.name -ex}

https://blogs.technet.microsoft.com/heyscriptingguy/2013/08/07/powertip-use-powershell-to-display-help-for-module-cmdlets/

List PowerShell modules
To obtain a listing of all modules that are available on the system but are not loaded into the Windows PowerShell console, you can use the Get-Module cmdlet with the −ListAvailable parameter, as shown here:

PS C:\> Get-Module –ListAvailable

Tip: Display Loaded and Available Modules in Windows PowerShell

Does this module support Updatable Help?
Some modules support Updatable Help and others do not. Fortunately, there’s an easy way to tell which modules support Updatable Help.

If the HelpInfoUri property of a command (such as cmdlet, function, CIM command, or workflow) has a value, and the value is valid (that is, it begins with “http” or “https”), the module supports Updatable Help.

PS C:\> Get-Module -ListAvailable | where HelpInfoUri

The HelpInfoUri property of each module object comes from the HelpInfoUri key in the module manifest. Following is the module manifest of the NetQos module, and you can see the HelpInfoUri key:

PS C:\> cat (get-module -list netqos).path

HelpInfoUri, HelpUri, and other Help Mysteries

Cmdlets

Get-Help

Run Update-Help in administrator mode

Update-Help
Update-Help -verbose

Get-Module lists available modules that are loaded into the Windows PowerShell console.
Get-Module –ListAvailable lists all modules that are available on the system but are not loaded into the Windows PowerShell console.

Get-Module
Get-Module –ListAvailable
Get-Module -ListAvailable | where HelpInfoUri

Get-Alias –Name ls
Get-ChildItem –Definition Get-ChildItem

Misc. info

PowerShell Reference

Set-ExecutionPolicy
About Execution Policies

http://www.techrepublic.com/blog/10-things/10-powershell-commands-every-windows-admin-should-know/
https://blogs.technet.microsoft.com/heyscriptingguy/2015/06/11/table-of-basic-powershell-commands/
http://www.pcworld.com/article/3131611/windows/how-to-use-windows-powershell-a-beginners-guide.html

https://msdn.microsoft.com/en-us/powershell
https://msdn.microsoft.com/powershell/scripting/getting-started/getting-started-with-windows-powershell
https://www.howtogeek.com/114344/5-cmdlets-to-get-you-started-with-powershell/
http://searchwindowsserver.techtarget.com/tip/Top-25-Windows-PowerShell-commands-for-administrators

https://www.howtogeek.com/138188/geek-school-learning-to-use-cmdlets-in-powershell/
https://www.howtogeek.com/138801/geek-school-using-powershell-to-get-computer-information/
https://www.howtogeek.com/138324/geek-school-learning-formatting-filtering-and-comparing-in-powershell/
https://www.howtogeek.com/137803/geek-school-learn-how-to-automate-windows-with-powershell/
https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.management/microsoft.powershell.management

Windows PowerShell Filtering and Formatting Data

http://www.computerperformance.co.uk/powershell/powershell_format_list.htm#Examples_of_PowerShell_Fl_Alias_of_Format-List

http://stackoverflow.com/questions/1825585/determine-installed-powershell-version

Using the Out-File Cmdlet

Get-Process | Out-File c:\scripts\test.txt

https://redmondmag.com/articles/2015/01/23/powershell-to-retrieve-info.aspx

Get-CimInstance Win32_OperatingSystem | FL *

http://windowsitpro.com/windows-server/using-powershell-find-your-operating-system-os-and-service-pack-sp-level

PowerShell-System Informtion

Get-SystemInfo -ComputerName <computername>

https://community.spiceworks.com/scripts/show/2773-get-remote-computer-system-and-hardware-information

https://msdn.microsoft.com/en-us/powershell
https://msdn.microsoft.com/en-us/powershell/scripting/getting-started/cookbooks/collecting-information-about-computers

Get-WmiObject -Class Win32_Desktop -ComputerName .

WMI Explorer
Download WMI Explorer:
Download from site 1
Download from site 2