'###########################
' Rename Computer
'###########################
rc = objWMIComputerSystem.Rename(strNewComputer, _
strDomainPasswd, _
strDomainUser)
I'm re-naming a machine, which works fine as above. Company Policy prohibits storing passwords & usernames in the script.
When I run the script as:
rc = objWMIComputerSystem.Rename(strNewComputer)
as a domain admin, I get error 5, access denied.
It does work if I code in some creds, but that isn't acceptable. How to use current windows users credentials in script?
David J.
' Rename Computer
'###########################
rc = objWMIComputerSystem.Rename(strNewComputer, _
strDomainPasswd, _
strDomainUser)
I'm re-naming a machine, which works fine as above. Company Policy prohibits storing passwords & usernames in the script.
When I run the script as:
rc = objWMIComputerSystem.Rename(strNewComputer)
as a domain admin, I get error 5, access denied.
It does work if I code in some creds, but that isn't acceptable. How to use current windows users credentials in script?
David J.