I had a list of Active directory user’s information in a text file. My task is to find whether the Administrator account is renamed or not.
I have written a script for checking the user named “Administrator” is there or not. if the user “Administrator” is present, my script is working fine and displays the output that "Administrator account is not renamed ".
If the user “Administrator” not present, it shows the ouput as “Error: Singular expression refers to nonexistent object” but i require the output as “Administrator account is not renamed”
now, an administrator account will ALWAYS start with
S-1-5-
and end with
-500
.
you can then extract the username from the “ProfileImagePath” value from the registry key that starts with S-1-5- and ends with -500, from the key location i mentioned earlier.
another approach is to run a VBScript (found in Microsoft’s scripting center) at this URL:
I want to display the users related to the Active Directory not related to OS.
Ben
Relevance as follows:
if (exists file “userinfo.txt” of folder “c:”) then (if (exists (preceding text of first “,” of (following text of first “=” of lines containing “Administrator” of file “userinfo.txt” of folder “c:” as string))) then “not renamed” else “renamed”) else “not known”
I need a custome script for getting first three octects from IP address for every client and then need to add fourth octet which is common to all the clients.
(Eg: X.X.X.200 where X.X.X will vary for the clients and last octet is same for all)
q: (preceding text of last
"." of (address of it as string) &
".200") of ip interfaces whose (address of it !=
"127.0.0.1") of network A: 192.168.158.200 A: 192.168.30.200 A: 192.168.2.200 A: 192.168.1.200 T: 0.221 ms I: plural string