标签: windows powershell scripting
使用PowerShell,我如何检查是否可以访问远程系统(例如\\SYSTEM0123\c$\)?
\\SYSTEM0123\c$\
答案 0 :(得分:1)
你可以try:
try
try { Get-Item -Path \\SYSTEM0123\c$ -ErrorAction Stop # if you have access these statements will run } catch { # Don't have access }