Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

ich möchte ein Skript das mir alle Usernamen mit Anmeldenamen mit zugehöriger OU anzeigt.

Momentan habe ich folgendes:

Get-ADUser -Filter 'UserPrincipalName -like "*@*"' -SearchBase "DC=xyz,DC=xyz,DC=xyz" -properties * | Format-Table -Property DisplayName, SAMAccountname, UserPrincipalName, distinguishedname

Im distinguished name ist auch die ou, allerdings zusammen mit dem CN und der Domäne. Ich möchte diese tabellenspalte so formatieren, das nur die OU angezeigt wird.

Es gibt halt mehrere OU's in denen Benutzeraccounts enthalten sind.

"Nur die OU" wird nicht gehen, da nur der Name der OU für die AD kein eindeutiger Wert ist. Ohne den DistinguishedName der OU ist das nicht eindeutig zuordenbar, ich kann zig OUs "User" anlegen, ohne den Pfad dorthin ist das nicht eindeutig

Mit

Get-ADUser -Filter * -propertys SAMAccountname, distinguishedname -SearchBase "OU=YYY,OU=XXX,DC=contoso,DC=local" | Format-Table  distinguishedname

Kommst wahrscheinlich am nächsten an das ran was du willst. Oder du schaust in der AD bei einem Benutzerkonto im Attribut-Editor was es sonst noch gibt.

Was möchtest du denn machen? Die OU eines Users ist relativ unwichtig im Vergleich zu den Gruppenmitgliedschaften etc.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.