lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
301 stars 37 forks source link

How to tag existing devices #339

Closed erikcurtis closed 1 year ago

erikcurtis commented 1 year ago

What's going on?

I have several devices that need tags. How can I set them?

Due Dilligance

lordmilko commented 1 year ago

You can modify object properties by doing Set-ObjectProperty -Tags. For more information on using Set-ObjectProperty please see the wiki

Note that modifying the tags of an object will completely replace any existing tags the object has (tags inherited from parent objects won't be affected). If you want to append tags to those that already exist, you need to construct an array of all the tags that should exist. The easiest way to get the tags defined on an object directly is to do Get-ObjectProperty and use the Tags property on the returned object