下面是示例代码不能在PowerShell中工作
这里$rpath就像共享驱动器\\xyz\share
$fso = new-Object -com Scripting.FileSystemObject $drivename = $fso.GetDriveName($rpath) $drive= $fso.GetDrive($drivename)
我得到以下错误
使用“1”参数调用“GetDrive”exception:“HRESULTexception:0x8 00A004C(CTL_E_PATHNOTFOUND)”