Tag: foreach

  • PowerShell: Find many users using their name

    This time around, I take the basis that I created last week, add a way to catch any users that is not found, as well as a way to run it on multiple users.

  • PowerShell: Finding host name from IP address

    In tech support, resolving IP addresses to host names can be something you do on a relatively frequent basis. While I’ve always used the CLI ping command with the -a option, I have also been working towards higher proficiency in PowerShell. Frankly, for a single IP address, I prefer sticking with CLI. When working with…

  • Powershell: A script to find all members of several groups refined

    One of the scripts that I use most often is the one I wrote about back in September of 2019. Usually, I only run it for up to ten or so groups, so it’s not a big problem to simply swap out the group name, rince and repeat. Recently, however, I needed to run it…

  • Powershell: Add user to multiple groups

    A while back, I had a user that had to be added to a large number (150+) of active directory groups. Rather than doing so manually, I spent a little time looking up how to automate it, and created a script to help me do it. Here’s how I constructed it: First, I needed to…