Power Shell - Adding/Removing users

Kaitian

Supreme [H]ardness
Joined
Aug 12, 2008
Messages
4,868
Does anyone have experience with power shell in removing or adding users from a list of 2003 / 2008 servers?

Scenario:
Group: portland\pornaddictgroup
Server: pornserver.newyork.wehostporn.com
The pornaddictgroup is in the Portland Domain which has Administrator privileges on the server "pornserver" in the "newyork" domain

The order comes in that pornaddictgroup cannot have access to pornserver and a multiple number of servers that I know about, instead of manually remote management into every one of those servers and revoking their access, I'm wondering if there's a PowerShell script that can do this.

I have an older PowerShell script made by some guy that retired and he doesn't do this anymore so it's limited to servers that can be pinged or accessed on the same domain group ie only newyork can modify newyork servers by shortname ie "pornserver" rather than FQDN "pornserver.newyork.wehostporn.com" The other issue is that if the shortname server isn't pingable but the FQDN server name is, it doesn't work and returns that it's nonresponsive.

So I just want to have it so that any group from ANY domain can be removed from any server that is defined by their FQDN and with feedback.

I'm a total idiot at powershell so it'd be a while to figure it out. Does anyone have a guide handy too that I could check out?
 
Back
Top