Computer Hope

Microsoft => Microsoft DOS => Topic started by: Franciscopinto on February 20, 2018, 12:56:33 PM

Title: Verify folders on list of servers
Post by: Franciscopinto on February 20, 2018, 12:56:33 PM
I have 50 servers that I want to verify if the following path exists.

D:\mssql\data
T:\mssql\data
e:\mssql\data

How do I do this. I want to report to me if it exists or not. Thank you
Title: Re: Verify folders on list of servers
Post by: DaveLembke on February 21, 2018, 07:55:14 AM
All 50 have these 3 paths?

Assuming you have shares set up to the paths to get to paths through UNC calls such as \\ServerName\d$\mssql\data  ?

Title: Re: Verify folders on list of servers
Post by: Squashman on February 21, 2018, 11:51:52 AM
Are they all physical drive letters on the servers?  If they are mapped drive letters it will never work because those only exist during a user session.
Title: Re: Verify folders on list of servers
Post by: Franciscopinto on February 21, 2018, 01:16:15 PM
No Shares. I just need to validate if the path has been created or not.
How do I create the script to go through 50 Servers and say whether the path exists or not.

Example:
Server A  Data: D:\mssql\data exists
Server A  Log: L:\mssql\data exists
Server B  Data: D\mssql\data exists
Server B Data: L:\mssql\data exists
Title: Re: Verify folders on list of servers
Post by: patio on February 21, 2018, 03:07:43 PM
Less clear now than when you started...