#创建 $pw = ConvertTo-SecureString 'XXXXXX' -AsPlainText -Force $Creds = New-Object -Typename System.Management.Automation.PSCredential -Argumentlist 'softdumpadmin', $pw New-PSDrive -Name P -PSProvider FileSystem -Root '\3.242.164.147SOE' -Credential $Creds -Persist #移除 Remove-PSDrive -Name P