Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Convert a DN to this Format finance.fabrikam.com-UsersContent of Convert a DN to this Format finance.fabrikam.com-Users.vbsMD5 Hash: BE67E50D0BEFAB8C621E5269439D1EAF |
||
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo") strUser = objSysInfo.UserName Set objUser = GetObject("LDAP://" & strUser) strDN = objUser.distinguishedName arrDN = Split(strDN, ",") For i = 0 to UBound(arrDN) intLength = Len(arrDN(i)) intCounter = intLength - 3 arrDN(i) = Right(arrDn(i), intCounter) Next For i = 1 to UBound(arrDN) - 1 strNewName = strNewName & arrDN(i) & "." Next intLastItem = UBound(arrDN) strNewName = strNewName & arrDN(intLastItem) & "/" & arrDN(0) Wscript.Echo strNewName | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |