PowerShell Community

A place for the community to learn PowerShell and share insights

On Preferences and Scopes

Progress in PowerShell: a tale of Verbosity and other preferences with lessons in Scopes and Proxies thrown in It started, as these things often do, with someone complaining. In PowerShell Version 7.2 the output of and look like this: In all the earlier versions they look like the version below, which is more helpful when you're trying ...

Understanding Get-ACL and AD Drive Output

Understanding Active Directory ACL using PowerShell can be a bit tricky. There are no out-of-the-box cmdlets with ActiveDirectory PowerShell module to help in settings the permission quickly. While there are no cmdlets, you can nevertheless manage AD permissions using the AD PowerShell drive. In this post, I will try to simplify Active ...

How to Make Use Of PowerShell Profile Files

Q: I would like to personalize the way that PowerShell works. I have heard that I can use a thing called a profile to do this, but when I try to find information about profiles, I come up blank. There is no cmdlet, so I do not see how to create such a thing. Can you help me, please? A: Profiles are a powerful part of PowerShell and allow you...

How can I be notified any time a service goes down?

Q: How can I be notified any time a service goes down? A: The short quick answer to utilizing WMI and PowerShell 7. You use PowerShell to create temporary event monitoring using WMI. Then WMI monitors any service changes and generates an alert once it detects a change. Basic Requirement To achieve this, you need Windows ...

How to Update or Add a Registry Key Value with PowerShell

Q: I am having a problem trying to update the registry. I am using the New-ItemProperty cmdlet, but it fails if the registry key does not exist. I added the –Force parameter, but it still does not create the registry key. The error message says that it cannot find the path because it does not exist. Is there something I am not doing? I ...