Showing results for April 2021 - PowerShell Community

Apr 21, 2021
171
6
0

Borrowing a built-in PowerShell command to create a temporary folder

Sean Kearney
Sean Kearney

Q: Hey I have a question for you. It seems silly and I know I could probably put something together with Get-Random. But can you think of another way to create a temporary folder with a random name in PowerShell? Ideally, I'd like it to be in a user's own "Temporary Folder" is possible. A: We sure can! If Doctor Scripto was sitting here right now...

FunctionFun trickExisting Cmdlet
Apr 15, 2021
144
7
1

Is a User a Local Administrator?

@DoctorDNS
@DoctorDNS

Q: Some of the things we do in our logon scripts require the user to be a local administrator. How can the script tell if the user is a local administrator or not, using PowerShell 7. A: Easy using PowerShell 7 and the LocalAccounts module Local Users and Groups The simple answer is of course, easily. And since you ask, with PowerShell 7! But le...

securitylocal userslogon scripts
Apr 2, 2021
184
0
1

Testing the connection to computers in the Active Directory

@DoctorDNS
@DoctorDNS

Q: As an administrator, I often have to do a lot of reporting on the servers in my domain. Is there a simple way to test the connection to every server in my domain or every server or client host in a specific OU? A: Of course you can do this with PowerShell! You can use the Active Directory cmdlets and , although it is not as simple as one might ...

Active Directorynetworking