31-08-2021
This commit is contained in:
@@ -66,3 +66,73 @@ PUBLIC C:\Users\Public
|
||||
CommonProgramFiles C:\Program Files\Common Files
|
||||
```
|
||||
|
||||
|
||||
|
||||
Afficher le PATH
|
||||
|
||||
```powershell
|
||||
> $env:Path
|
||||
C:\Program Files\Parallels\Parallels Tools\Applications;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\PowerShell\7\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Users\bruno\AppData\Local\Microsoft\WindowsApps;C:\Users\bruno\AppData\Local\Programs\Microsoft VS Code\bin
|
||||
```
|
||||
|
||||
Ajouter au PATH
|
||||
|
||||
```
|
||||
$addPath = 'C:\Folder\bin'
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### which:
|
||||
|
||||
`Get-Command <command>`
|
||||
|
||||
```powershell
|
||||
Get-Command wsl
|
||||
|
||||
CommandType Name Version Source
|
||||
----------- ---- ------- ------
|
||||
Application wsl.exe 10.0.22... C:\WINDOWS\system32\wsl.exe
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Version de Powershell:
|
||||
|
||||
`Get-Host`
|
||||
|
||||
```powershell
|
||||
PS C:\Users\bruno> Get-Host
|
||||
|
||||
Name : ConsoleHost
|
||||
Version : 7.1.4
|
||||
InstanceId : c47454ef-ce56-4af8-b3e0-6b10825d6f8f
|
||||
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
|
||||
CurrentCulture : fr-FR
|
||||
CurrentUICulture : fr-FR
|
||||
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
|
||||
DebuggerEnabled : True
|
||||
IsRunspacePushed : False
|
||||
Runspace : System.Management.Automation.Runspaces.LocalRunspace
|
||||
```
|
||||
|
||||
`(Get-Host).Version`
|
||||
|
||||
```powershell
|
||||
PS C:\Users\bruno> (Get-Host).Version
|
||||
|
||||
Major Minor Build Revision
|
||||
----- ----- ----- --------
|
||||
7 1 4 -1
|
||||
```
|
||||
|
||||
`$PSVersionTable.PSVersion`
|
||||
|
||||
```powershell
|
||||
PS C:\Users\bruno> $PSVersionTable.PSVersion
|
||||
|
||||
Major Minor Patch PreReleaseLabel BuildLabel
|
||||
----- ----- ----- --------------- ----------
|
||||
7 1 4
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user