January 13th, 2013

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

Doctor Scripto
Scripter

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

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.