From 4b889563b4e336791a474d01239617cab13ac0f3 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 14 Jul 2024 11:44:34 +0200 Subject: [PATCH] added some functions --- GetProjectUsers.ps1 | 17 +++++++++++++++++ GetRoles.ps1 | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 GetProjectUsers.ps1 create mode 100644 GetRoles.ps1 diff --git a/GetProjectUsers.ps1 b/GetProjectUsers.ps1 new file mode 100644 index 0000000..ac874ca --- /dev/null +++ b/GetProjectUsers.ps1 @@ -0,0 +1,17 @@ +# Parameter help description +[CmdletBinding()] +param ( + [string] + $Name +) + +if($PSBoundParameters.ContainsKey('Name')){ + . .\Variables.ps1 + $Read='GR-'+$Name+'-RO,' + $Write='GR-'+$Name+'-RW,' + Write-Host $Read+$Roles + Write-Host $Write+$Roles + Return $null +} + +throw "No such Project was found" \ No newline at end of file diff --git a/GetRoles.ps1 b/GetRoles.ps1 new file mode 100644 index 0000000..5e9fdae --- /dev/null +++ b/GetRoles.ps1 @@ -0,0 +1,3 @@ +. .\Variables.ps1 + +Get-ADGroup -SearchBase $Roles \ No newline at end of file