Get-NBDCIMRack
Since
v4.4.10.0
SYNOPSIS
Get racks from Netbox
SYNTAX
Query (Default)
Get-NBDCIMRack [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Name <String>]
[-Query <String>] [-Site_Id <UInt64>] [-Site <String>] [-Location_Id <UInt64>] [-Tenant_Id <UInt64>]
[-Status <String>] [-Role_Id <UInt64>] [-Serial <String>] [-Asset_Tag <String>] [-Facility_Id <String>]
[-Limit <UInt16>] [-Offset <UInt16>] [-Raw] [-ProgressAction <ActionPreference>] [<CommonParameters>]
ByID
Get-NBDCIMRack [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Id <UInt64[]>]
[-Limit <UInt16>] [-Offset <UInt16>] [-Raw] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Retrieves rack objects from Netbox with optional filtering.
EXAMPLES
EXAMPLE 1
Get-NBDCIMRack
Returns all racks
EXAMPLE 2
Get-NBDCIMRack -Site_Id 1
Returns all racks at site with ID 1
EXAMPLE 3
Get-NBDCIMRack -Name "Rack-01"
Returns racks matching the name "Rack-01"
PARAMETERS
-All
Automatically fetch all pages of results. Uses the API's pagination to retrieve all items across multiple requests.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-PageSize
Number of items per page when using -All. Default: 100. Range: 1-1000.
```yaml Type: Int32 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 100 Accept pipeline input: False Accept wildcard characters: False ```
-Brief
Return a minimal representation of objects (id, url, display, name only). Reduces response size by ~90%. Ideal for dropdowns and reference lists.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Fields
Specify which fields to include in the response. Supports nested field selection (e.g., 'site.name', 'device_type.model').
```yaml Type: String[] Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Omit
Specify which fields to exclude from the response. Requires Netbox 4.5.0 or later.
```yaml Type: String[] Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Id
The ID of the rack to retrieve
```yaml Type: UInt64[] Parameter Sets: ByID Aliases:
Required: False Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ```
-Name
Filter by rack name
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Query
A general search query
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Site_Id
Filter by site ID
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Site
Filter by site name
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Location_Id
Filter by location ID
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Tenant_Id
Filter by tenant ID
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Status
Filter by status (active, planned, reserved, deprecated)
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Role_Id
Filter by role ID
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Serial
Filter by serial number
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Asset_Tag
Filter by asset tag
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Facility_Id
Filter by facility ID
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Limit
Limit the number of results
```yaml Type: UInt16 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Offset
Offset for pagination
```yaml Type: UInt16 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Raw
Return the raw API response
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-ProgressAction
{{ Fill ProgressAction Description }}
```yaml Type: ActionPreference Parameter Sets: (All) Aliases: proga
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.
INPUTS
OUTPUTS
System.Management.Automation.PSObject
NOTES
AddedInVersion: v4.4.10.0 The -Brief, -Fields, and -Omit parameters are mutually exclusive.