Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Rename a Local User Account on a Windows XP Computer?

Hey, Scripting Guy! How can I rename a local user account on a Windows XP computer?-- TY Hey, TY. You know, nowadays the “in” thing is to poke fun at Microsoft and Windows XP. We know: we’ve seen the new commercials from that one computer company. (Remember, the computer company that used to be good, a long time ago?) But as much as ...

How Can I Distinguish Between Local Users and Domain Users?

Hey, Scripting Guy! When using a script to return members of the local Administrators account, how can I distinguish between local users and domain users?-- KS Hey, KS. You know, many years ago there was a TV game show called What’s My Line? The premise of the show was that some person with an unusual occupation would come out on stage ...

How Can I Delete Everyone Except the Administrator and the Domain Admins Group from the Local Administrators Group?

Hey, Scripting Guy! How can I delete everyone except the Administrator and the Domain Admins group from the local Administrators group?-- JS Hey, JS. You know, when you become a doctor you have to take the Hippocratic Oath, which famously begins, “First, do no harm.” When you become a Scripting Guy you have to take the Scriptocratic ...

How Can I Determine the Name of the Local Administrators Group?

Hey, Scripting Guy! How can I determine the name of the local Administrators group? This can vary depending on the operating system language; for example, in German the name of the group is Administratoren.-- DS Hey, DS. You know, the first thought that popped into our heads when we read your question was this: just call Scripting Guy Peter...

How Can I List All the Users in an NT 4.0 Domain?

Hey, Scripting Guy! How can I list all the users in an NT 4.0 domain, along with their description and logon script path?-- HH Hey, HH. Ah, yes NT 4.0. Windows NT 4.0 reminds us of dandelions: it doesn’t matter whether you like dandelions or not, there’s simply no way to get rid of them. The same is true of NT 4.0. Regardless of what ...