Why does it always seems like the most simple of tasks are the most difficult to accomplish? Goal: run a powershell script on the next login with the RunOnce registry key. Better idea: bang head against the wall for an hour. This Stack Overflow page was useful with getting started, but the issue was I […]
Windows Spotlight has some nice wallpaper and I’d like to keep a couple for later use, so here’s the shortest Powershell script I could make to save them to my Pictures directory: I only copy files greater than 141160 bytes because some files in that directory are not wallpapers and the largest non-wallpaper file is […]
Getting a simple script to check if an AD user exists has been a nightmare. I wanted something simple and straightforward and I finally found it. Another options would be to use dsquery: These are the simplest options I can find.
I’ve been trying to get all my servers snmp settings fixed and it’s been kind of a pain. Powershell doesn’t have any good cmdlets, but I’ve found a couple examples. This is very nice script, but doesn’t work on remote machines unless you do PS Remoting. (I need to bone up on my PS remoting now.) […]
Get-ADUser -Filter is really finicky. I finally figured out what I was doing wrong with the help of this wonderfully detailed Powershellish.com post. Basically, I can’t use properties of variables with -Filter This does NOT work: This does work:
I had to find the dhcp server, but I can’t find any good method in Powershell. So I’m using Powershell to parse ipconfig /all. Which will take: DHCP Server . . . . . . . . . . . : 10.10.4.2 And give you: 10.10.4.2
This blog post had a simple solution for getting a list of domain controllers in Powershell. Although for my script I ended up dropping the Select-Object name. I’m used this as a (very) quick and dirty way to diagnose an AD replication issue by comparing a file’s known modify datetime with copies in the other […]