2024-07-14 11:44:34 +02:00
|
|
|
# Parameter help description
|
|
|
|
[CmdletBinding()]
|
|
|
|
param (
|
|
|
|
[string]
|
|
|
|
$Name
|
|
|
|
)
|
|
|
|
|
|
|
|
if($PSBoundParameters.ContainsKey('Name')){
|
|
|
|
. .\Variables.ps1
|
2024-07-14 13:01:03 +02:00
|
|
|
$Read='GR-'+$Name+'-RO'
|
|
|
|
$Write='GR-'+$Name+'-RW'
|
2024-07-14 11:44:34 +02:00
|
|
|
Write-Host $Read+$Roles
|
|
|
|
Write-Host $Write+$Roles
|
2024-07-14 13:01:03 +02:00
|
|
|
$ReadUsers=Get-ADGroupMember -Recursive -Identity $Read
|
|
|
|
$WriteUsers
|
2024-07-14 11:44:34 +02:00
|
|
|
Return $null
|
|
|
|
}
|
|
|
|
|
|
|
|
throw "No such Project was found"
|