Skip to content

Get-IBObject

Synopsis

Retrieve objects from the Infoblox database.

Syntax

ByType (Default)

Get-IBObject [-ObjectType] <String> [-Filter <Object>] [-MaxResults <Int32>] [-PageSize <Int32>]
 [-ReturnField <String[]>] [-ReturnBase] [-ReturnAll] [-ProxySearch] [-ProfileName <String>]
 [-WAPIHost <String>] [-WAPIVersion <String>] [-Credential <PSCredential>] [-SkipCertificateCheck]
 [<CommonParameters>]

ByTypeNoPaging

Get-IBObject [-ObjectType] <String> [-Filter <Object>] [-NoPaging] [-ReturnField <String[]>] [-ReturnBase]
 [-ReturnAll] [-ProxySearch] [-ProfileName <String>] [-WAPIHost <String>] [-WAPIVersion <String>]
 [-Credential <PSCredential>] [-SkipCertificateCheck] [<CommonParameters>]

ByRef

Get-IBObject [-ObjectRef] <String> [-ReturnField <String[]>] [-ReturnBase] [-ReturnAll] [-BatchMode]
 [-BatchGroupSize <Int32>] [-ProxySearch] [-ProfileName <String>] [-WAPIHost <String>] [-WAPIVersion <String>]
 [-Credential <PSCredential>] [-SkipCertificateCheck] [<CommonParameters>]

Description

Query a specific object's details by specifying ObjectRef or search for a set of objects using ObjectType and optional Filter arguments. For large result sets, query pagination will automatically be used to fetch all results. The result count can be limited with the -MaxResults parameter.

Examples

Example 1: Get specific object

Get-IBObject -ObjectRef 'record:host/XxXxXxXxXxXxXxX'

Get the basic fields for a specific Host record.

Example 2: Get A records with filters

Get-IBObject 'record:a' -Filter @{'name~'='example\.com'} -MaxResults 100 -ReturnField 'comment' -ReturnBase

Get the first 100 A records in the example.com DNS zone and return the comment field in addition to the basic fields.

Example 3: Get network containers within another container

Get-IBObject -ObjectType 'networkcontainer' -Filter 'network_container=192.168.1.0/19'

Get all network containers that have a parent container of 192.168.1.0/19

Example 4: Get networks within a network container

Get-IBObject -ObjectType 'network' -Filter 'network_container=192.168.1.0/20'

Get all networks that have a parent container of 192.168.1.0/20

Parameters

-BatchGroupSize

The number of objects that should be sent in each group when -BatchMode is specified. The default is 1000.

Type: Int32
Parameter Sets: ByRef
Aliases:

Required: False
Position: Named
Default value: 1000
Accept pipeline input: False
Accept wildcard characters: False

-BatchMode

If specified, objects passed via pipeline will be batched together into groups and sent as a single WAPI call per group instead of a WAPI call per object. This can increase performance but if any of the individual calls fail, the whole group is cancelled.

Type: SwitchParameter
Parameter Sets: ByRef
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Username and password for the Infoblox appliance. This parameter is required unless it was already set using Set-IBConfig.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter

A hashtable with search filter conditions (e.g. @{'name~'='myhost';ipv4addr='10.10.10.10'}). All conditions must be satisfied to match an object. The filters can also be specified as an array of strings but the field names and values must be URL encoded by the caller in advance (e.g. "name%7E=myhost","ipv4addr=10.10.10.10"). With both methods, all conditions must be satisfied to match an object.

NOTE: WAPI field names are case sensitive. The value specified for a field is also case sensitive unless using the case insensitive modififer, :, or accounting for case via regex.

See Infoblox WAPI documentation for advanced usage details.

Type: Object
Parameter Sets: ByType, ByTypeNoPaging
Aliases: Filters

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxResults

If set to a positive number, the results list will be truncated to that number if necessary. If set to a negative number and the results would exceed the absolute value, an error is thrown.

Type: Int32
Parameter Sets: ByType
Aliases:

Required: False
Position: Named
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: False

-NoPaging

If specified, automatic paging will not be used. This is occasionally necessary for some object type queries that return a single object reference such as dhcp:statistics.

Type: SwitchParameter
Parameter Sets: ByTypeNoPaging
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ObjectRef

Object reference string. This is usually found in the "_ref" field of returned objects.

Type: String
Parameter Sets: ByRef
Aliases: _ref, ref

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ObjectType

Object type string. (e.g. network, record:host, range)

Type: String
Parameter Sets: ByType, ByTypeNoPaging
Aliases: type

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageSize

The number of results to retrieve per request when auto-paging large result sets. Defaults to 1000. Set this lower if you have very large results that are causing errors with ConvertTo-Json.

Type: Int32
Parameter Sets: ByType
Aliases:

Required: False
Position: Named
Default value: 1000
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName

The name of a specific config profile to use instead of the currently active one.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxySearch

If specified, the request is redirected to Grid manager for processing.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ReturnAll

If specified, all readable fields will be returned for the object. This switch relies on Get-IBSchema and as such requires WAPI 1.7.5+. Because of the additional web requests necessary to make this work, it is also not recommended for performance critical code.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: all, ReturnAllFields

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ReturnBase

If specified, the standard fields for this object type will be returned in addition to the object reference and any additional fields specified by -ReturnField. If -ReturnField is not used, this defaults to $true.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: base, ReturnBaseFields

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ReturnField

The set of fields that should be returned in addition to the object reference.

Type: String[]
Parameter Sets: (All)
Aliases: fields, ReturnFields

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipCertificateCheck

If set, SSL/TLS certificate validation will be disabled. Overrides value stored with Set-IBConfig.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WAPIHost

The fully qualified DNS name or IP address of the Infoblox WAPI endpoint (usually the grid master). This parameter is required if not already set using Set-IBConfig.

Type: String
Parameter Sets: (All)
Aliases: host

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WAPIVersion

The version of the Infoblox WAPI to make calls against (e.g. '2.2'). This parameter is required if not already set using Set-IBConfig.

Type: String
Parameter Sets: (All)
Aliases: version

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

PSCustomObject

Zero or more objects found by the search or object reference. If an object reference is specified that doesn't exist, an error will be thrown.

Set-IBConfig