Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to create and manage Guests #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CedricMoreau
Copy link
Contributor

No description provided.

@alagoutte alagoutte added the need-test Need a test (psester) integration label Oct 7, 2018
Copy link
Collaborator

@alagoutte alagoutte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add cmdlet to remove a guest ?

PowerArubaCP/Public/Guest.ps1 Show resolved Hide resolved
PowerArubaCP/Public/Guest.ps1 Show resolved Hide resolved
.DESCRIPTION
Add Guest account on Aruba ClearPass
.EXAMPLE
Add-ArubaCPGuest -username -company -mail -role [-enable] [-expire]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove [-enable] -expire]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 [email protected] -role 2 -enable True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Power and Aruba user ? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the name of user add on your example ;)

[Parameter(Mandatory = $true)]
[int]$role,
[Parameter(Mandatory = $false)]
[ValidateSet ("True", "False")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use switch type ? :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No yet fixed


$guest | add-member -name "role_id" -membertype NoteProperty -Value $role

if ( $PsBoundParameters.ContainsKey('enable'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)]/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real example

[ValidateRange (1,3)]
[int]$role,
[Parameter(Mandatory = $false)]
[ValidateSet ("true", "false")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use switch..

[ValidateSet ("true", "false")]
[string]$enable,
[Parameter(Mandatory = $false)]
[String]$expire
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use direct timestamp value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing that, only need to pass the role id/number

Copy link
Collaborator

@alagoutte alagoutte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need some rework before merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-test Need a test (psester) integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants