< Back

Invoke-ArubaSWWebRequest

Sat Jan 18, 2020 8:38 pm

NAME Invoke-ArubaSWWebRequest



SYNOPSIS

Invoke WebRequest with ArubaSW connection (internal) variable





SYNTAX

Invoke-ArubaSWWebRequest [-uri] <String> [-method <String>] [-body <PSObject>] [-connection <PSObject>]

[<CommonParameters>]





DESCRIPTION

Invoke WebRequest with ArubaSW connection variable (IP Address, cookie, port...)





PARAMETERS

-uri <String>



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-method <String>



Required? false

Position? named

Default value get

Accept pipeline input? false

Accept wildcard characters? false



-body <PSObject>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-connection <PSObject>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Invoke-ArubaSWWebRequest -method "get" -uri "rest/v4/vlan"



Invoke-WebRequest with ArubaSW connection for get rest/v4/vlan









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Invoke-ArubaSWWebRequest "rest/v1/system"



Invoke-WebRequest with ArubaSW connection for get rest/v1/system uri with default GET method parameter









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Invoke-ArubaSWWebRequest -method "post" -uri "rest/v1/system" -body $body



Invoke-WebRequest with ArubaSW connection for post rest/v1/system uri with $body payload









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Invoke-ArubaSWWebRequest -method "get" -uri "rest/v1/system" -depth 1 -selector configuration



Invoke-WebRequest with ArubaSW connection for get rest/v1/system with depth 1 and select only configuration











RELATED LINKS