{"id":14980459,"url":"https://github.com/rmbolger/posh-ibwapi","last_synced_at":"2025-10-11T11:47:04.682Z","repository":{"id":48301683,"uuid":"87963283","full_name":"rmbolger/Posh-IBWAPI","owner":"rmbolger","description":"PowerShell module for interacting with the Infoblox WAPI (REST API).","archived":false,"fork":false,"pushed_at":"2025-07-30T18:26:53.000Z","size":341,"stargazers_count":58,"open_issues_count":3,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-11T11:47:04.000Z","etag":null,"topics":["infoblox","infoblox-wapi","powershell","powershell-core","rest","wapi"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmbolger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-11T17:49:25.000Z","updated_at":"2025-08-27T12:12:22.000Z","dependencies_parsed_at":"2022-09-12T04:11:07.881Z","dependency_job_id":"1d15ca48-b5ca-43d5-ba04-43c95b794a01","html_url":"https://github.com/rmbolger/Posh-IBWAPI","commit_stats":{"total_commits":205,"total_committers":4,"mean_commits":51.25,"dds":0.09756097560975607,"last_synced_commit":"677d73ee37f11ac58d1d206f5e9c27b42bcd1082"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/rmbolger/Posh-IBWAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmbolger%2FPosh-IBWAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmbolger%2FPosh-IBWAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmbolger%2FPosh-IBWAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmbolger%2FPosh-IBWAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmbolger","download_url":"https://codeload.github.com/rmbolger/Posh-IBWAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmbolger%2FPosh-IBWAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007065,"owners_count":26084230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infoblox","infoblox-wapi","powershell","powershell-core","rest","wapi"],"created_at":"2024-09-24T14:01:48.431Z","updated_at":"2025-10-11T11:47:04.649Z","avatar_url":"https://github.com/rmbolger.png","language":"PowerShell","readme":"# Posh-IBWAPI\r\n\r\nA PowerShell module to help with Infoblox automation via WAPI requests and functions. It is not intended to wrap every object into a set of custom cmdlets or strong types. Instead, it aims to hide the some of the tedious complexity in calling the Infoblox REST API via PowerShell.\r\n\r\n## Features\r\n\r\n- Automatic paging for large GET result sets *(Requires WAPI version 1.5+)*\r\n- Automatic session handling\r\n- `Receive-IBFile` and `Send-IBFile` wrappers for upload/download WAPI functions. [(Guide)](https://docs.dvolve.net/Posh-IBWAPI/v4/Guides/Using-IBFile-Functions/)\r\n- Optionally return all fields for an object without needing to specify each one individually *(Requires WAPI version 1.7.5+)*\r\n- Use `Get-IBSchema` for Get-Help style querying of the WAPI object model *(Requires WAPI version 1.7.5+)*. [(Guide)](https://docs.dvolve.net/Posh-IBWAPI/v4/Guides/Using-Get-IBSchema/)\r\n- Error details in the body of HTTP 400 responses are exposed instead of being swallowed by Invoke-RestMethod.\r\n- Optionally batch pipelined requests to increase performance.\r\n- Optionally ignore certificate validation errors.\r\n- Save connection profiles to use automatically with functions instead of supplying them to each call. Multiple profiles supported for multi-grid environments or differing credentials on the same grid.\r\n- [SecretManagement](https://devblogs.microsoft.com/powershell/secretmanagement-and-secretstore-are-generally-available/) support for connection profiles. [(Guide)](https://docs.dvolve.net/Posh-IBWAPI/v4/Guides/Using-SecretManagement/)\r\n- Cloud friendly stateless mode supported via environment variables. [(Guide)](https://docs.dvolve.net/Posh-IBWAPI/v4/Guides/Stateless-Mode/)\r\n- Cross-platform [PowerShell](https://github.com/PowerShell/PowerShell) support\r\n\r\n## Installation (Stable)\r\n\r\nThe latest release can found in the [PowerShell Gallery](https://www.powershellgallery.com/packages/Posh-IBWAPI/) or the [GitHub releases page](https://github.com/rmbolger/Posh-IBWAPI/releases). Installing is easiest from the gallery using `Install-Module`. *See [Installing PowerShellGet](https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget) if you run into problems with it.*\r\n\r\n```powershell\r\n# install for all users (requires elevated privs)\r\nInstall-Module -Name Posh-IBWAPI -Scope AllUsers\r\n\r\n# install for current user\r\nInstall-Module -Name Posh-IBWAPI -Scope CurrentUser\r\n```\r\n\r\n*NOTE: If you use PowerShell 5.1 or earlier, `Install-Module` may throw an error depending on your Windows and .NET version due to a change PowerShell Gallery made to their TLS settings. For more info and a workaround, see the [official blog post](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/).*\r\n\r\n## Installation (Development)\r\n\r\n[![Pester Tests badge](https://github.com/rmbolger/Posh-IBWAPI/workflows/Pester%20Tests/badge.svg)](https://github.com/rmbolger/Posh-IBWAPI/actions)\r\n\r\nUse the following PowerShell command to install the latest *development* version from the git `main` branch. This method assumes a default [`PSModulePath`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_psmodulepath) environment variable and installs to the CurrentUser scope.\r\n\r\n```powershell\r\niex (irm https://raw.githubusercontent.com/rmbolger/Posh-IBWAPI/main/instdev.ps1)\r\n```\r\n\r\nYou can also download the source manually from GitHub and extract the `Posh-IBWAPI` folder to your desired module location.\r\n\r\n## Quick Start\r\n\r\nEvery WAPI call needs a host, version, and credentials. Set them once using `Set-IBConfig` and you won't need to add them to every call. If your grid is still using self-signed certs, you may also need to use the `SkipCertificateCheck` parameter. In addition to standard version numbers like `'2.2'`, the `-WAPIVersion` parameter also accepts `'latest'` and will query the grid master for the latest supported version.\r\n\r\n```powershell\r\nSet-IBConfig -ProfileName 'mygrid' -WAPIHost 'gridmaster.example.com' `\r\n    -WAPIVersion 'latest' -Credential (Get-Credential) -SkipCertificateCheck\r\n```\r\n\r\nRetrieve a set of objects using `Get-IBObject`. The only required parameter is `ObjectType`. Everything else like filters and return fields are optional.\r\n\r\n```powershell\r\nGet-IBObject 'record:host'\r\nGet-IBObject 'record:host' -Filter @{'name~'='example\\.com'} -MaxResults 10 -ReturnField 'extattrs'\r\n```\r\n\r\nIf you're just exploring the WAPI object model, it can be helpful to convert the resulting objects back to JSON for readability.\r\n\r\n```powershell\r\nGet-IBObject 'record:host' | Select -First 1 | ConvertTo-Json -Depth 5\r\n```\r\n\r\nYou may notice that all objects returned by Infoblox have a `_ref` field. That is known as the object reference and can be used in any function that accepts an `ObjectRef` parameter. In the case of `Get-IBObject`, it will return that specific object.\r\n\r\n```powershell\r\nGet-IBObject -ObjectRef 'record:host/asdfqwerasdfqwerasdfqwerasdfqwer'\r\n```\r\n\r\nCreate a new object with `New-IBObject` by supplying the object type and an object with the minimum required fields defined. Embedded WAPI functions work just fine here.\r\n\r\n```powershell\r\n# Build the record:host object we want to create.\r\n# NOTE: An error will be thrown if the example.com DNS zone doesn't\r\n# exist in Infoblox\r\n$newhost = @{\r\n    name = 'web1.example.com'\r\n    ipv4addrs = @(\r\n        @{ ipv4addr = '10.10.10.1' }\r\n    )\r\n    comment = 'web server'\r\n}\r\n\r\n# Create the object\r\nNew-IBObject -ObjectType 'record:host' -IBObject $newhost\r\n\r\n# Modify the object so we can make another and this time use an\r\n# embedded function to set the IP address.\r\n$newhost.name = 'web2.example.com'\r\n$newhost.ipv4addrs = @(\r\n    @{ ipv4addr = 'func:nextavailableip:10.10.10.0/24'}\r\n)\r\nNew-IBObject -ObjectType 'record:host' -IBObject $newhost\r\n```\r\n\r\nTo modify an existing object, the easiest way is usually to get a copy of it, modify the copy, and save the result with `Set-IBObject`. *Be wary of objects that return read-only fields. You need to strip them out before saving or an error will be thrown.*\r\n\r\n```powershell\r\n# Get a copy of the host\r\n$myhost = Get-IBObject 'record:host' -Filter 'name=web1.example.com'\r\n\r\n# Modify the first listed IP address\r\n$myhost.ipv4addrs[0].ipv4addr = '10.10.10.100'\r\n\r\n# remove the read-only 'host' field from the nested 'record:host_ipv4addr' object\r\n$myhost.ipv4addrs[0].PSObject.Properties.Remove('host')\r\n\r\n# Save the result\r\n$myhost | Set-IBObject\r\n```\r\n\r\nIf you need to make the same change to a set of objects, you can also pass the set of object references via the pipeline and use a template object to change all of them in the same way.\r\n\r\n```powershell\r\n# Get all hosts in the Los Angeles site\r\n$laHosts = Get-IBObject 'record:host' -Filter @{'*Site'='Los Angeles'}\r\n\r\n# Move them to the New York site\r\n$laHosts | Set-IBObject -Template @{extattrs=@{Site=@{value='New York'}}}\r\n```\r\n\r\nDeleting one or more objects is as simple as passing one or more object references to `Remove-IBObject`.\r\n\r\n```powershell\r\n# Get hosts being decommissioned\r\n$toDelete = Get-IBObject 'record:host' -Filter 'comment=decommission'\r\n\r\n# Delete them\r\n$toDelete | Remove-IBObject\r\n```\r\n\r\nFor more examples, check the [Definitive REST Examples](https://docs.dvolve.net/Posh-IBWAPI/v4/Guides/Definitive-REST-Examples/) guide.\r\n\r\n## Requirements and Platform Support\r\n\r\n* Supports Windows PowerShell 5.1 (Desktop edition) with .NET Framework 4.5.2 or later\r\n* Supports [PowerShell](https://github.com/PowerShell/PowerShell) 7.0 or later (Core edition) on all supported OS platforms.\r\n* Supports any NIOS/WAPI version, but only regularly tested against Infoblox supported versions.\r\n\r\n## Changelog\r\n\r\nSee [CHANGELOG.md](/CHANGELOG.md)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmbolger%2Fposh-ibwapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmbolger%2Fposh-ibwapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmbolger%2Fposh-ibwapi/lists"}