映射网络驱动器

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

#移除
Remove-PSDrive -Name P

 

posted @ 2015-05-08 14:24  dongdonggeorge  阅读(282)  评论(0编辑  收藏  举报