Skip to content

[Misc] Hinzufügen neuer Skripte für das Offboarding von JEs #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Misc/JE-Offboarding/Remove-JE-Contatcs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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.
# The script is used to remove the je contacts that are used in the configuration of the various BDSU distribution groups like BDSU MIT Line.

Connect-ExchangeOnline

$Contacts = Get-MailContact -Resultsize unlimited
$FilteredJeContacts = $Contacts | Where-Object {$_.PrimarySmtpAddress -like '*@je-domain.org'}
$FilteredJeContacts | Sort-Object Identity
$FilteredJeContacts | ForEach-Object {
Users | ForEach-Object {
# Before you remove the guest user pls check if everything is correct and than remove the comment
# Remove-MailContact -Identity $_.PrimarySmtpAddress -Confirm:$false
Write-Host "Removed contact" $_.Identity
}
11 changes: 11 additions & 0 deletions Misc/JE-Offboarding/Remove-JE-Guest-Users copy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# The script is used to remove JE guest accounts that allow access to the BDSU intranet.
Connect-AzureAd

$GuestUsers = Get-AzureADUser -Filter "UserType eq 'Guest'" -All $true
$JeUsers = $GuestUsers | Where-Object {$_.mail -like '*@je-domain.org'}
$JeUsers | Sort-Object DisplayName
$JeUsers | ForEach-Object {
# Before you remove the guest user pls check if everything is correct and than remove the comment
# Remove-AzureADUser -ObjectId $_.ObjectId
Write-Host "Removed guest user" $_.DisplayName
}
5 changes: 4 additions & 1 deletion Misc/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
### [Delete-Mail-Globally.ps1](Delete-Mail-Globally.ps1)
Skript, um eingenangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.
Skript, um eingenangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Skript, um eingenangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.
Skript, um eingegangene und nicht gefilterte Phishing-Emails aus allen vorhandenen Postfächern im MS365 Tenant zu entfernen.


### [JE-Offboarding](/admin-scripts/Misc/JE-Offboarding/)
Skripte, um eine JE, die nicht mehr Teil des BDSU ist offzuboarden