hi i'd like to change local admin password to all pc connected i created an exe file. when i try it manually it works, but when i put in a kix script it doesn't work.
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
MSTCOOL
What rights do users have running the script??? Must be admin. How did you create the .exe?
Other solution: Search the board for renameadmin.exe (http://home.comcast.net/~habullock/Library/RenameAdmin.exe). It's a tool created by Howard which you can use to reset the admin password from your workstation. You could create a .txt or a .ini with all the computer names. Use this file as input etc. etc.
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
shell "command"to run the exe file,but the best way is use GP to change admin password,you can create the batch in every computer when the logon in domain
Running it via a GPO is not secure either. Users have rights to read that script as well and see what you're doing.
Only some type of encrypted method is considered reasonably safe. Remote scripts or Scheduled Tasks are an acceptable risk to many Admins depending on the situation involved.
Les, I am actually using your local admin password changing script. The script works great. I am tyring to run this script from a server with domain admin rights to change local admin passwords for workstations and exclude servers. Aside from using the exclude list (which I would primarily use to exclude specific workstations), is there an easy way to do this? There may be some servers that I forget to include in the list. I've tried using @PRODUCTTYPE, but it only reads the registry from the server I am running the script from.
Basically, you should be able to read the same info that the macro gets out of the registry remotely. Since upgrading to AD, I no longer use NetView b ut rather just pull from AD using ADODB. There are lots of examples of it on the board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
You're right. I found it. Jens had a posting for OSID(). I tried to do the same thing, but for unknown reasons it didn't work. I'll have to try working off his UDF to see what I did wrong.
Break On $sComputer='computername' $sComputer = '\\'+Join(Split($sComputer,'\'),'',3)+'\' $Server = ReadValue($sComputer+'HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions','ProductType') If $Server <> "WinNT" ; System is not a Workstation so assume it is a Server ? 'System is a Server ' + $Server Else ? 'System is a workstation ' + $Server EndIf
This line of code (originally formulated by Radimus) would work better in the long run as well. It will take and strip out the \\ or \ if supplied and add them if they're not supplied
'\\COMP1\' or 'COMP1' or '\COMP1\' or 'COMP\' are all handled correctly as '\\COMP1\' for the final value.
I just noticed that Heroik hijacked this thread from mstcool. Sorry abou that.
mstcool are you all set now with any of these solutions?
Heroik in the future, please do not hijack someone else's topic. Please create your own post and ask your question. You can post a link to another thread that you think pertains to your issue, but it's not appropriate to take over another posting.
Sorry about the hijack. I thought it followed the subject of the thread, but I guess that doesn't matter, I should've posted a new thread. Thank you for the help.