softcake
Goto Top

Eigene OU anzeigen

Hallo, wie kann ich eigentlich herausfinden in welcher OU ich bin? Geht das mit der Console?

Content-Key: 94203

Url: https://administrator.de/contentid/94203

Ausgedruckt am: 28.03.2024 um 19:03 Uhr

Mitglied: simsons
simsons 12.08.2008 um 09:59:12 Uhr
Goto Top
Du brauchst nur in die ZLK gehen. Dann geht es auch mit der Console.
Mitglied: bastla
bastla 12.08.2008 um 10:00:48 Uhr
Goto Top
Hallo softcake!

Mit dem folgenden Batch (unter Verwendung von etwas VBScript) sollte es gehen:
@echo off & setlocal
set G=%temp%\GetOU.vbs
>%G% echo WScript.Echo GetObject(GetObject("LDAP://" ^& CreateObject("ADSystemInfo").UserName).Parent).distinguishedName  
for /f "delims=" %%i in ('cscript //nologo %G%') do set "OU=%%i"  
echo %OU%
Grüße
bastla
Mitglied: softcake
softcake 12.08.2008 um 10:05:14 Uhr
Goto Top
suupi, danke face-smile

gruß
softcake
Mitglied: dragon23
dragon23 12.08.2008 um 10:37:00 Uhr
Goto Top
Oder noch einfacher geht's indem du die cmd öffnest
gpresult eintippst dadurch erhältst du eine ausführliche Liste darüber welche Richtlinien greifen,welche OU etc.
Du kannst natürlich am besten gleich das Ergebnis in eine Textdatei umleiten.

z.B. so
gpresult > c:\policy_result.txt


gruß
dragon23
Mitglied: softcake
softcake 12.08.2008 um 10:48:21 Uhr
Goto Top
danke dir, ist auch sehr hilfreich, damit bekomme ich dann gleich noch mehr Infos.. prima.

gruß
softcake