Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Remove domain account on remote computer using its local credentials

$
0
0

I want to make a script that will remove domain user account from remote computer. Right now I tested dosen of methods. I have stick to this:

([ADSI]"WinNT://$computerName/$localGroupName,group").Remove("WinNT://$domainName/$userName")

Thats absolutely working on local computer, but when I try to reach the remote computer I get 'Access Denied' error.

I do know the credentials for remote computer. I know how to created credential object. Now I am stuck with - how to force it use credential object with that kind of task?

Invoke is not an option.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>