Is it possible to write a script to see what drives are mapped on each server. Would I use a powershell script to do so? What would this script look like?
--David
Mapped drives on servers
Re: Mapped drives on servers
Are you running something like NSClient on the remote machine? NSClient can execute just about any remote remote script, and send the result back to your Nagios server.
I do not have a powershell script handy to provide you with, but maybe these links can help out:
http://superuser.com/questions/782863/l ... ell-script
http://techibee.com/powershell/powershe ... rives/1156
https://community.spiceworks.com/topic/ ... k-computer
If you get one of those working, check out this document for how-to on running scripts using NSClient.
I do not have a powershell script handy to provide you with, but maybe these links can help out:
http://superuser.com/questions/782863/l ... ell-script
http://techibee.com/powershell/powershe ... rives/1156
https://community.spiceworks.com/topic/ ... k-computer
If you get one of those working, check out this document for how-to on running scripts using NSClient.
Former Nagios Employee.
me.
me.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Mapped drives on servers
This is quite a complicated topic.
Basically NSClient++ runs as the SYSTEM user.
Mapped drives are specific to the user that is logged on. Machines like Remote Desktop Session Hosts have many users logged in at any one time, all with their own mapped drives.
Can you explain perhaps why you want to see what drives are mapped, perhaps there is an easy solution once we know your end goal.
Basically NSClient++ runs as the SYSTEM user.
Mapped drives are specific to the user that is logged on. Machines like Remote Desktop Session Hosts have many users logged in at any one time, all with their own mapped drives.
Can you explain perhaps why you want to see what drives are mapped, perhaps there is an easy solution once we know your end goal.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Mapped drives on servers
We have certain systems that use particular drives on the servers. If at any point there is a server that is down do to maintenance or what have you, and the mapping is lost, we need to know about it.
Re: Mapped drives on servers
This is a bit of a weird question. If the server is down to maintenance, you should know that with other checks? Do you mean a mapped network drive with "the mapping"? This would imply it is mapped with a user which is always logged in? Or you are using something like this? http://stackoverflow.com/questions/1827 ... 24#4763324
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Mapped drives on servers
@ddedden please provide some clarification about the above points, thanks!
Former Nagios employee
Re: Mapped drives on servers
@tmcdonald the servers that we run are windows 2008 R2 and 2012R2. We have services that run on these servers as well as scheduled tasks. The drives are mapped on the server, but I do not think they are user specific. There are two drives that are heavily used. We have a server team that does maintenance on all the servers monthly. For some reason these drives are dropped. We actually have a task we can run after the fact that will map the required drives. What I am seeking is to have a script on the servers that Nagios can execute and spit back to the GUI what drives are mapped on these servers after the scheduled maintenance so I don't have to log into every server and manually check the mappings.
Re: Mapped drives on servers
Have you checked any of the links that have been posted here?
Former Nagios Employee.
me.
me.