New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


set WMI Free Disk Space sensor Drive property in poweshell

Votes:

0

Your Vote:

Up

Down

I have to add 100s of disk space sensors from a powershell script that identifies all the varying number of disks on each server. Each time I clone ones of these sensors, how can I set it to the relevant drive letter to check against (F:, G:, H:, etc)?

There doesnt appear to be any way of setting the Drive?

I've also tried with raw properties, and it looks like it is stored in primarychannel_, but can't seem to set this either.

Is there a way in PS to set the drive each time I clone one?

drive powershell wmi-free-disk-sensor

Created on Sep 21, 2020 5:54:25 PM by  madaw (60) 1 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

I did find a workaround to doing it, in case anyone else has the same issue.

To my clone device I added a set of Disk Space sensors for drives F-Z. Then as I clone the device for each server I just remove the Disk Space sensors for which there isn't an actual disk.

I did this for other reasons (I have other sensors being created with the device), but of course, you could simply set up individual Disk Space sensors for drives C-Z, and just identify and clone the ones that match the disks on your server.

Mark

Created on Sep 25, 2020 8:25:16 AM by  madaw (60) 1 1



5 Replies

Votes:

0

Your Vote:

Up

Down

Hello there,

Cloning a sensor will always copy all settings from the root sensors. Unfortunately, it is not possible to adjust the monitored partitions afterwards, since this information is gathered during the meta scan when adding the sensor. When cloning, this is not done.

Only way around this, would be using an auto discovery instead of cloning.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Sep 22, 2020 3:39:20 PM by  Birk Guttmann [Paessler Support]

Last change on Sep 24, 2020 10:12:39 AM by  Birk Guttmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thank you for your reply. I'm not cloning a script, I'm cloning a basic Disk Space sensor where I need to set the Drive.

When you say "When cloning, this is not done.", are you saying the meta scan doesn't take place then? Which is good and should enable me to change the Drive?

So, is there any way to add Disk Space sensors from a PS script and set the drive as they are added? I have way too many to add manually, and they frequently change.

Created on Sep 23, 2020 1:21:04 PM by  madaw (60) 1 1



Votes:

0

Your Vote:

Up

Down

Hi there,

Sorry, I accidentally wrote script instead of sensor and changed it accordingly in my last response.

The meta scan takes not place, which means that the cloned sensor does not know about the added drives and simply monitors the ones that were also monitored by the root sensor.

It is not possible to do this with a script. Also it won't work to have the flexibility in one sensor to change the available disks automatically. You can also choose singly partitions when adding the sensor, so you can keep the old sensor and still add new partitions.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Sep 24, 2020 10:19:25 AM by  Birk Guttmann [Paessler Support]



Accepted Answer

Votes:

1

Your Vote:

Up

Down

I did find a workaround to doing it, in case anyone else has the same issue.

To my clone device I added a set of Disk Space sensors for drives F-Z. Then as I clone the device for each server I just remove the Disk Space sensors for which there isn't an actual disk.

I did this for other reasons (I have other sensors being created with the device), but of course, you could simply set up individual Disk Space sensors for drives C-Z, and just identify and clone the ones that match the disks on your server.

Mark

Created on Sep 25, 2020 8:25:16 AM by  madaw (60) 1 1



Votes:

0

Your Vote:

Up

Down

Hi Mark,

Thanks for sharing your workaround.

Have a great day.

Created on Sep 25, 2020 2:17:17 PM by  Birk Guttmann [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.