File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1+ # The script is used to remove the je contacts that are used in the configuration of the various BDSU distribution groups like BDS MIT Line.
2+
3+ $Contacts = Get-MailContact - Resultsize unlimited
4+ $FilteredJeContacts = $Contacts | Where-Object {$_.PrimarySmtpAddress -like ' *@je-domain.org' }
5+ $FilteredJeContacts | Sort-Object Identity
6+ $FilteredJeContacts | ForEach-Object {
7+ Users | ForEach-Object {
8+ # Before you remove the guest user pls check if everything is correct and than remove the comment
9+ # Remove-MailContact -Identity $_.PrimarySmtpAddress -Confirm:$false
10+ Write-Host " Removed contact" $_.Identity
11+ }
Original file line number Diff line number Diff line change 1+ # The script is used to remove JE guest accounts that allow access to the BDSU intranet.
2+
3+ $GuestUsers = Get-AzureADUser - Filter " UserType eq 'Guest'" - All $true
4+ $JeUsers = $GuestUsers | Where-Object {$_.mail -like ' *@je-domain.org' }
5+ $JeUsers | Sort-Object DisplayName
6+ $JeUsers | ForEach-Object {
7+ # Before you remove the guest user pls check if everything is correct and than remove the comment
8+ # Remove-AzureADUser -ObjectId $_.ObjectId
9+ Write-Host " Removed guest user" $_.DisplayName
10+ }
Original file line number Diff line number Diff line change 11### [ Delete-Mail-Globally.ps1] ( Delete-Mail-Globally.ps1 )
2- Skript, um eingenangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.
2+ Skript, um eingenangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.
3+
4+ ### [ JE-Offboarding] ( /admin-scripts/Misc/JE-Offboarding/ )
5+ Skripte, um eine JE, die nicht mehr Teil des BDSU ist offzuboarden
You can’t perform that action at this time.
0 commit comments