PowerTip: Test the Presence of a Remote Share by Using PowerShell

PowerTip: Test the Presence of a Remote Share by Using PowerShell

  • Comments 1
  • Likes

Summary: Learn how to use a Windows PowerShell cmdlet to test the presence of a remote share.

Hey, Scripting Guy! Question How can I use Windows PowerShell to test for the presence of a share on a remote server?

Hey, Scripting Guy! Answer Use the Test-Path cmdlet and supply a UNC path, as shown here.

13:55 C:\> Test-Path \\Server1\downloads

True

 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Is there any way to specify credentials explicitly?