Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人知道 PowerShell 中以下 windows 命令的等价物吗:
net use \\server_name\share_name /delete
我想从 powershell 断开共享,包括未映射为共享驱动器的共享。
WMI 应该可以解决问题:
ps> get-wmiobject -computer server -class win32_share -credential $creds | ` where-object { $_.name -eq "sharedfolder" } | foreach-object { $_.delete() }