Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. Built on the Microsoft .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.
To determine which version of Powershell is installed, open a command line window (cmd.exe) and use the following command:
|
We can see here Powershell V4.0 is installed
Please see Microsoft Documentation pages here: Installing Windows PowerShell.
To run PowerShell scripts (files that end with .ps1), you must first set the execution policy to Unrestricted. This operation has to be done once.
To do so, open a command line window (cmd.exe) as an Administrator and use the following command:
c:\Charon>powershell -command "Set-ExecutionPolicy Unrestricted" |
The ExecutionPolicy can also be set to "Remotesigned
". In this case the .ps1
script files will have to be unblocked as described further.
For more, see Using the Set-ExecutionPolicy Cmdlet (Microsoft TechNet)
To check execution policy settings, use the following command:
|
For more, see Using the Get-ExecutionPolicy Cmdlet (Microsoft TechNet)
In some cases, you will maybe have to unblock the .ps1 file for not being prompted to allow for execution:
c:\Charon>powershell -command "Unblock-File -path c:\charon\myscript.ps1" |
|
|
Requires the product is installed using standard settings. This will not list CHARON-AXP or CHARON-VAX for example but will list CHARON-AXP/SMA
Variant:
|
Before version 4.8:
|
Starting version 4.8:
|
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.