snap
This commit is contained in:
parent
d508ea6730
commit
a9e9495f8a
@ -2,18 +2,21 @@
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[string]
|
||||
$Name
|
||||
$Name,
|
||||
[string]
|
||||
$Server
|
||||
)
|
||||
|
||||
if($PSBoundParameters.ContainsKey('Name')){
|
||||
. .\Variables.ps1
|
||||
$Read='GR-'+$Name+'-RO'
|
||||
$Write='GR-'+$Name+'-RW'
|
||||
Write-Host $Read+$Roles
|
||||
Write-Host $Write+$Roles
|
||||
$ReadUsers=Get-ADGroupMember -Recursive -Identity $Read
|
||||
$WriteUsers
|
||||
Return $null
|
||||
$Roles
|
||||
if($PSBoundParameters.ContainsKey('Server')){
|
||||
$Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name
|
||||
} else {
|
||||
$Roles = . .\GetRoles.ps1 | Where-Object Name -Match $Name
|
||||
}
|
||||
return $Users = $Roles | Get-ADGroupMember | Get-Unique
|
||||
}
|
||||
|
||||
throw "No such Project was found"
|
Loading…
Reference in New Issue
Block a user