PowerShell获取当前目录文件夹路径path的方法

1,277 阅读1分钟

PowerShell获取当前目录文件夹路径path的方法

($pwd).Path

($pwd).Path

($pwd).Path
(Get-Location).path

(Get-Location).path

(Get-Location).path
(Resolve-Path .).path

(Resolve-Path .).path

(Resolve-Path .).path
(gi .).FullName

(gi .).FullName

(gi .).FullName
demo

在这里插入图片描述

PS C:\program files> ($pwd).Path
C:\program files
PS C:\program files> (Get-Location).path
C:\program files
PS C:\program files> (Resolve-Path .).path
C:\program files
PS C:\program files> (gi .).FullName
C:\program files
PS C:\program files>