Add function to create and manage Guests - #7
Conversation
alagoutte
left a comment
There was a problem hiding this comment.
Need to add cmdlet to remove a guest ?
| .DESCRIPTION | ||
| Add Guest account on Aruba ClearPass | ||
| .EXAMPLE | ||
| Add-ArubaCPGuest -username -company -mail -role [-enable] [-expire] |
There was a problem hiding this comment.
remove [-enable] -expire]
There was a problem hiding this comment.
and make a really example
| Add-ArubaCPGuest -username -company -mail -role [-enable] [-expire] | ||
| Add the guest account with parameters. | ||
| .EXAMPLE | ||
| Add-ArubaCPGuest -username matthew -company "Interstellar & Co" -mail matt.hew@matthew.com -role 2 -enable True |
There was a problem hiding this comment.
Add Power and Aruba user ? :)
There was a problem hiding this comment.
About the name of user add on your example ;)
| [Parameter(Mandatory = $true)] | ||
| [int]$role, | ||
| [Parameter(Mandatory = $false)] | ||
| [ValidateSet ("True", "False")] |
|
|
||
| $guest | add-member -name "role_id" -membertype NoteProperty -Value $role | ||
|
|
||
| if ( $PsBoundParameters.ContainsKey('enable')) |
There was a problem hiding this comment.
use switch type it will be more easy
| .DESCRIPTION | ||
| Set information about a guest account based on his username on Aruba ClearPass. | ||
| .EXAMPLE | ||
| Set-ArubaCPGuest -username test [-company] [-mail] [-role (1/2/3)] [-enable (true/false)] [-expire (hour/day/week/month/year)]/ |
| [ValidateRange (1,3)] | ||
| [int]$role, | ||
| [Parameter(Mandatory = $false)] | ||
| [ValidateSet ("true", "false")] |
| [ValidateSet ("true", "false")] | ||
| [string]$enable, | ||
| [Parameter(Mandatory = $false)] | ||
| [String]$expire |
There was a problem hiding this comment.
use direct timestamp value
There was a problem hiding this comment.
directly send the timestamp to the function (the conversion number of day to timestamp need to be make by user on the script but not in this module)
|
|
||
| if ( $PsBoundParameters.ContainsKey('role')) | ||
| { | ||
| switch( $role ) { |
There was a problem hiding this comment.
missing that, only need to pass the role id/number
alagoutte
left a comment
There was a problem hiding this comment.
need some rework before merge
No description provided.