-
-
Notifications
You must be signed in to change notification settings - Fork 92
/
Add-PASPTAPrivilegedGroup.ps1
42 lines (31 loc) · 1.02 KB
/
Add-PASPTAPrivilegedGroup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# .ExternalHelp psPAS-help.xml
Function Add-PASPTAPrivilegedGroup {
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[parameter(
Mandatory = $true,
ValueFromPipelinebyPropertyName = $true
)]
[string]$domain,
[parameter(
Mandatory = $true,
ValueFromPipelinebyPropertyName = $true
)]
[string]$group
)
BEGIN {
Assert-VersionRequirement -SelfHosted
Assert-VersionRequirement -RequiredVersion 14.0
}#begin
PROCESS {
#Create request URL
$URI = "$($psPASSession.BaseURI)/API/pta/API/configuration/properties/PrivilegedDomainGroupsList"
#Create body of request
$Body = $PSBoundParameters | Get-PASParameter | ConvertTo-Json
if ($PSCmdlet.ShouldProcess($group, 'Add PTA Privileged Domain Group Configuration')) {
#send request to web service
Invoke-PASRestMethod -Uri $URI -Method PATCH -Body $Body
}
}#process
END { }#end
}