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 UserGroup (Add/Set/Remove) #261

Merged
merged 12 commits into from
Sep 15, 2024
21 changes: 21 additions & 0 deletions PowerFGT/Private/Confirm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,25 @@ Function Confirm-FGTUserLocal {

$true

}

Function Confirm-FGTUserGroup {

Param (
[Parameter (Mandatory = $true)]
[object]$argument
)

if ( -not ( $argument | get-member -name name -Membertype Properties)) {
throw "Element specified does not contain a name property."
}
if ( -not ( $argument | get-member -name id -Membertype Properties)) {
throw "Element specified does not contain an id property."
}
if ( -not ( $argument | get-member -name group-type -Membertype Properties)) {
throw "Element specified does not contain a group-type property."
}

$true

}
Loading
Loading