Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-nbIpAddress cannot search with assigned_object_id specified #45

Open
thefreakquency opened this issue Aug 20, 2021 · 0 comments
Open

Comments

@thefreakquency
Copy link

It looks like there is a small bug with Get-nbIpAddress. When using Get-nbIpAddress -query @{assigned_object_id=5137} the result of this query returns all IP addresses contained in Netbox. If I use another query like Get-nbIpAddress -query @{id=17} I receive a single entry which is what's expected.

In the meantime, I do the query offline as a workaround, but it would be nice to leverage the API for a concise query:

$variable = Get-nbIpAddress
$variable | Where-Object {$_.assigned_object_ID -eq 5137}
$psversiontable
Name                           Value
----                           -----
PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

(Get-Module | Where-Object {$_.Name -eq 'powerbox'}).version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      3      5      -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant