Eigene OU anzeigen
Hallo, wie kann ich eigentlich herausfinden in welcher OU ich bin? Geht das mit der Console?
Please also mark the comments that contributed to the solution of the article
Content-Key: 94203
Url: https://administrator.de/contentid/94203
Printed on: April 25, 2024 at 07:04 o'clock
5 Comments
Latest comment
Hallo softcake!
Mit dem folgenden Batch (unter Verwendung von etwas VBScript) sollte es gehen:
Grüße
bastla
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%
bastla