Oct 26 2021 01:22 PM
function Get-Group {
Write-Host
try {
$groupName = Read-Host -Prompt "Enter name of Group, or q to quit"
if ($groupName -eq "q"){Exit}
$groupInfo = Get-ADGroup -Identity $groupName
}
catch {
write-host "That Group does not exist. Please check that you entered the name correctly." -ForegroundColor Red
Write-Host
Get-Group
}
Write-Host "Name: " $groupInfo.Name -ForegroundColor Green
Write-Host "Group Type: " $groupInfo.GroupCategory -ForegroundColor Green
Write-Host
$RightGroup = Read-Host -Prompt "Is this the correct Group? (Yes/No/Cancel)"
if ($RightGroup -eq "Cancel" -or $RightGroup -eq "c" -or $RightGroup -eq "C") { Exit }
elseif ($RightGroup -eq "Yes" -or $RightGroup -eq "y" -or $RightGroup -eq "Y") { return $GroupInfo}
else { Get-Group}
}
Thanks,
Kevin
Oct 26 2021 03:10 PM
Hello @KevinSmith,
Please look into this solution/approach:
It sounds pretty similar to what you are trying to accomplish.
Add-DLSentPermission -DLName "Project management" -User andrew_svintsitsky
Group "Project Management" contain another group "logmein" user will be allowed to send emails to both of those groups.
Hope that helps.
Nov 04 2021 11:06 PM