Differences

This shows you the differences between the selected revisions of the page.

library_powershell 2023-02-10 library_powershell 2026-02-03 (current)
Line 4: Line 4:
[[wp>PowerShell|PowerShell]] is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on .NET. [[wp>PowerShell|PowerShell]] is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on .NET.
-Windows PowerShell (''powershell.exe'') is built into Windows 7 and newer; and is optionally available for Windows 98 SP2 and newer.((&wikipedia_ref(PowerShell|PowerShell))) &win9x It uses .NET Framework. Its successor, PowerShell (''pwsh.exe''), previously known as PowerShell Core, aka PowerShell 6/7, is cross-platform and can be optionally installed in Windows. It uses .NET (previously known as .NET Core). +Windows PowerShell (''powershell.exe'') is built into Windows 7 and newer; and is optionally available for older versions of Windows.((&wikipedia_ref(PowerShell|PowerShell))) &winold It uses .NET Framework. Its successor, PowerShell (''pwsh.exe''), previously known as PowerShell Core, aka PowerShell 6/7, is cross-platform and can be optionally installed in Windows. It uses .NET (previously known as .NET Core).
PowerShell scripts can be directly executed, they do not need to be compiled first. PowerShell scripts can be directly executed, they do not need to be compiled first.
Line 17: Line 17:
powershell.exe -File upload.ps1 powershell.exe -File upload.ps1
</code> </code>
 +
 +PowerShell (Core)'s ''pwsh.exe'' installs into ''C:\Program Files\PowerShell\<version>''.
Note that by default, executing PowerShell scripts is disabled. To override that, you can either lift the restriction by typing using ''[[ps>microsoft.powershell.security/set-executionpolicy|Set-ExecutionPolicy]]'' cmdlet on PowerShell administrator console:((Run ''powershell.exe'' as Administrator to get PowerShell console.)) Note that by default, executing PowerShell scripts is disabled. To override that, you can either lift the restriction by typing using ''[[ps>microsoft.powershell.security/set-executionpolicy|Set-ExecutionPolicy]]'' cmdlet on PowerShell administrator console:((Run ''powershell.exe'' as Administrator to get PowerShell console.))
Line 29: Line 31:
powershell.exe -ExecutionPolicy Unrestricted -File upload.ps1 powershell.exe -ExecutionPolicy Unrestricted -File upload.ps1
</code> </code>
- 
-PowerShell (Core)'s ''pwsh.exe'' installs into ''C:\Program Files\PowerShell\<version>''. 
===== [[install]] Installing the Assembly ===== ===== [[install]] Installing the Assembly =====

Last modified: by martin