Skip to content

Conversation

@moe-bit
Copy link
Contributor

@moe-bit moe-bit commented Sep 15, 2021

No description provided.

Copy link
Member

@acran acran left a comment

Choose a reason for hiding this comment

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

Bitte auch nochmal die Verwendung von Leerzeilen überdenken: Doppelte Leerzeilen, Leerzeilen direkt vor/nach schließenden/öffnenden Klammern zieht den Code nur auseinander und erhöht aber nicht die Lesbarkeit

Um dieses Skript ausführen zu können, muss erst eine weitere Abhängigkeit
durch einen entsprechenden PowerShell-Befehl installiert werden.
## Zusätzliche Abhängigkeiten
Um diesee Skripte ausführen zu können, müssen erst weitere Abhängigkeiten
Copy link
Member

Choose a reason for hiding this comment

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

Der Satz hat noch ein paar Typos / Grammatikfehler ;)

Get-PSSession | Where-Object {$_.ComputerName -eq "outlook.office365.com"} | Remove-PSSession

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credentials -Authentication Basic -AllowRedirection
Import-PSSession $session
Copy link
Member

Choose a reason for hiding this comment

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

Warum wird überhaupt die Exchange Shell benötigt? Die Gruppenmitglieder auslesen kann man doch auch schon mit dem AzureAD Modul??

Copy link
Member

Choose a reason for hiding this comment

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

bzw. sogar gleich mit dem MSOnline Modul? dann braucht es hier nichtmal AzureAD

```pwsh
Install-Module MSOnline
```
**Achtung**: Microsoft empfiehlt selbst, das Modul nicht mehr zu benutzen, allerdings wurde bis heute keine Alternative vorstellt, mit welchem anderen Modul die MFA aktiviert werden kann. Sobald es eine Alternative gibt, wird das Skript angepasst.
Copy link
Member

Choose a reason for hiding this comment

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

```pwsh
Install-Module MSOnline
```
**Achtung**: Microsoft empfiehlt selbst, das Modul nicht mehr zu benutzen, allerdings wurde bis heute keine Alternative vorstellt, mit welchem anderen Modul die MFA aktiviert werden kann. Sobald es eine Alternative gibt, wird das Skript angepasst.
Copy link
Member

Choose a reason for hiding this comment

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

Bitte maximale Zeilen länge in der Datei beachten


}

$mfaGroups.GetEnumerator() | ForEach-Object{
Copy link
Member

Choose a reason for hiding this comment

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

$_.name wird nie zugegriffen, GetEnumerator() ist damit unnötig...
$_.name könnte aber ausgegeben werden, um anzuzeigen, welche Gruppe gerade verarbeitet wird

$st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$st.RelyingParty = "*"
$st.State = "Enabled"
$sta = @($st)
Copy link
Member

Choose a reason for hiding this comment

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

Kann das vor den Loop verschoben werden, oder muss das Objekt jedes mal neu erstellt werden?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants