lordmilko / PrtgAPI

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

Cannot get with-property to work #295

Closed kacoroski closed 2 years ago

kacoroski commented 2 years ago

What's going on?

I think this is a documentation problem and possible a problem with the with-property cmdlet as I cannot find it. Trying to get https://github.com/lordmilko/PrtgAPI/wiki/Miscellaneous#with-property to work and cannot get any of the examples to work. Not sure what I am missing

PS C:\Users\Administrator> get-sensor -Id 1005

Name Id Device Group Probe Status


Disk Free 1005 Probe Device Local Probe Local Probe Up

PS C:\Users\Administrator> get-sensor -Id 1005 |get-channel

Name SensorId Id LastValue LimitsEnabled UpperErrorLimit LowerErrorLimit ErrorLimitMessage


Total 1005 -1 694 GB False Free Bytes C: 1005 4 694 GB False Free Space C: 1005 5 93 % False

PS C:\Users\Administrator> get-sensor -Id 1005 |get-channel | foreach { $ | Get-Channel | Add-Member SensorName $.Name -Force } Get-Channel : Parameter set cannot be resolved using the specified named parameters. At line:1 char:51

Get-Channel : Parameter set cannot be resolved using the specified named parameters. At line:1 char:51

Get-Channel : Parameter set cannot be resolved using the specified named parameters. At line:1 char:51

PS C:\Users\Administrator> get-sensor -Id 1005 |get-channel | with-property { $__.Name } with-property : The term 'with-property' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:36

Due Dilligance

lordmilko commented 2 years ago

As per the documentation

With-Property From PrtgAPI 0.10

This very cool feature isn't released yet. Sorry!