Windows Powershell & Powershell Core

Scripte-Feature-Image

Windows Powershell & Powershell Core
1. Powershell Core works side-by-side with Windows Powershell

Windows Powershell
1. Its version is from 1.0 ~5.1
2. It only support Windows (Workstation & Server)
3. It is installed by default or via Windows Management Framework
4. It is based on .Net Framework and relies on .Net Framework runtime
5. It is called by “powershell.exe”

Powershell Core
1. Its version is from 6.0 ~7.1
2. It support Windows, Mac OS, Linux
3. It is installed by Installation package
4. It is based on .Net Core and relies on .Net Core runtime
5. It is called by “pwsh.exe” or “pwsh”

Powershell Installation Path

Windows Powershell $env:WINDIR\System32\WindowsPowerShell\v1.0
Powershell 7 $env:ProgramFiles\Powershell\7

Powershell Module Path
1. There are 3 type of Powershell Module scope: AllUsers, CurrentUser and System
2. AllUsers — the module accessible to all users
3. CurrentUser — the module only to the current users
4. System — the module ship with Powershell

Windows Powershell

Systme $env:WINDIR\system32\WindowsPowerShell\v1.0\Modules
AllUsers $env:ProgramFiles\WindowsPowerShell\Modules
CurrentUser $HOME\Documents\WindowsPowerShell\Modules

Powershell 7:

Systme $PSHOME\Modules
AllUsers $env:ProgramFiles\PowerShell\Modules
CurrentUser $HOME\Documents\PowerShell\Modules

Powershell Profiles Path
1. It is used to customizes environment such as commands, aliases, functions, variabls etc
2. It run when Powershell starts

Windows Posershell $HOME\Documents\WindowsPowerShell
Powershell 7 $HOME\Documents\PowerShell

 

Author: Joe Chan