PowerShell a plusieurs des mêmes commandes que Linux. pwd est l'équivalent de la commande.
Lorsque vous tapez pwd dans Powershell, c'est un alias de Get-Location .
En plus de Get-Location et ses Alias, vous pouvez également utiliser la variable automatique $pwd .
Le $pwd variable est agréable car vous avez un accès direct aux membres PathInfo. Par exemple
$pwd.Path.PadLeft(80)
$pwd.Drive
Et si jamais vous voulez savoir quels membres il y a, vous pouvez simplement diriger la commande\alias vers Get-Member :
PS C:\Users\your-name-here\Desktop> pwd|Get-Member
TypeName: System.Management.Automation.PathInfo
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Drive Property System.Management.Automation.PSDriveInfo Drive {get;}
Path Property System.String Path {get;}
Provider Property System.Management.Automation.ProviderInfo Provider {get;}
ProviderPath Property System.String ProviderPath {get;}
Get-Location cmdlet devrait faire l'affaire
Comme Thiago l'a mentionné, vous pouvez utiliser ces alias :gl ou pwd