Public/User.ps1
function Get-ArubaCXUser { <# .SYNOPSIS Get Aruba CX user .DESCRIPTION Get all informations about Aruba CX Users .EXAMPLE Get-ArubaCXUser List all users in ArubaCX #> Param( [Int]$depth, [Parameter(Mandatory = $false)] [ValidateSet("configuration", "status", "statistics", "writable")] [String]$selector, [Parameter(Mandatory = $false)] [String[]]$attributes, [Parameter(Mandatory = $false)] [switch]$vsx_peer, [Parameter (Mandatory = $False)] [ValidateNotNullOrEmpty()] [PSObject]$connection = $DefaultArubaCXConnection ) Begin { } Process { $invokeParams = @{ } if ( $PsBoundParameters.ContainsKey('depth') ) { $invokeParams.add( 'depth', $depth ) } if ( $PsBoundParameters.ContainsKey('selector') ) { $invokeParams.add( 'selector', $selector ) } if ( $PsBoundParameters.ContainsKey('attributes') ) { $invokeParams.add( 'attributes', $attributes ) } if ( $PsBoundParameters.ContainsKey('vsx_peer') ) { $invokeParams.add( 'vsx_peer', $true ) } $uri = "system/users" $response = Invoke-ArubaCXRestMethod -uri $uri -method 'GET' -connection $connection @invokeParams $response } End { } } |