Sometimes it's the last place that admins look... Logs 🙂 Something goes wrong, and you don't know why. Logs tell a lot! (When I deploy some Endpoint Manager packages and suddenly they don't work, I put in some logging and discover why things don't work) This blog post shows you a few ways to enable logging and how to read back all PowerShell actions on a device.
Month: July 2022
PowerShell tips and tricks
Over the years, I learned many PowerShell tricks but stopped using a few because they were outdated or not that smart to use anymore performance-wise. In this blog post, I will share a few of them 🙂 (These are just a few, I will write a new blog post with others in the future)
10.000 views and a bit of personal history
First of all, I would like to thank you all! Thanks for visiting my site and responding to things I post here and on Facebook, LinkedIn, Twitter, and GitHub. 10K views from March until now and just above 5,5K visitors. Happy to see these numbers! In this blog post, I will tell you some more things about me and why I like PowerShell 🙂
Report on Active Directory OU permissions using PowerShell
For one of our customers, we are working on restricting permissions of admin accounts by implementing Role Based Access and delegating permissions to Organizational Units (OUs). But one of the first questions was… What are the current permissions, and what should we remove and where? In this blog post, I will show you a way to report on the current permissions so that you can remove them where they shouldn't be granted 🙂
Retrieve Security events from Active Directory using PowerShell
In a previous blog post (here), I wrote about how to get a list of changes in Active Directory administrative groups. I got a question about that on Facebook... The question was: Nice to get a list of changed groups and what the change was, but what account made that change? This blog post shows you a way to get all the security events from the Domain Controller security logs 🙂
Using Windows Terminal for PowerShell
The Windows Terminal application has been out for a while now, and it's one of the things (Next to my Edge Browser, Teams, and Outlook, of course 🙂 ) that I start after logging into my laptop. It's a Terminal application that allows you to have multiple PowerShell (Or cmd, ssh, or even WSL Linux sessions) open. In this blog post, I will show you some configuration settings to make it your go-to app for command-line stuff 🙂
Report on changed Active Directory groups using PowerShell
Currently, I'm working for a customer on a new security model for their Active Directory. We discussed how to report on changes in certain administrative groups. I did this in the past using the Active Directory command-line tools (dsquery, dsget, etc.), but in this blog post, I will show you how to do this using PowerShell.
Updating your PowerShell modules to the latest version plus cleaning up older versions
You installed a PowerShell module on your machine and used it for a long time, and suddenly... It no longer connects, shows warnings that some commands are deprecated, and now what?! In this blog post, I will show you how to update all your modules to the latest version and remove unused older versions.
Upload Windows Autopilot hardware hash easily
Retrieving the hardware hash for a new laptop or VM involves a few steps. Starting PowerShell, configuring the execution policy, installing the get-windowsautopilot script, answering a few prompts, and entering your credentials to upload it to your environment. In this blog post, I will show you how to minimize the number of steps needed.
Using the PowerShell SecretManagement module
Sometimes you need to enter credentials in a script to connect to something, you can prompt the user to enter credentials but that doesn't work for Scheduled Tasks of course 🙂 Using a clear-text password in a script is never a good idea and that's where the SecretsManagement module comes into play, this blog post will show you how you can use it in your scripts.