So I thought this one worth a send because I learned something, and think you may too. I finished reading ”How to Win Friends and Influence People” by Dale Carenegie a bit ago, but have ha...
I don’t have a solid way to store scripts I’ve written (some good, some bad), and oftentimes forget which each does. This’ll let me store for next time, keep some notes, and maybe help someone else out. Disclaimer: There are a million ways to do most of this stuff, these are just the ways *I* fixed it. Yes, yours are probably much better, but I’m happy to help if I can. - Andy Tillo
Nobody else had anything else out there like this, so figured since I like to dig to see how things work, I’d lay out how I got all the videos to play. I’m not going to go into intricate deta...
Had a few hundred GB of files that had multiple versions of images/videos scattered throughout the drive, so I thought I’d clean it up: THIS SCRIPT REQUIRES P$ VERSION 4.0 –(MOSTLY FOR THE ...
Ran like this: #List of shares: $shares = @( "\share1thisthat" "\share2thisthatalso" ) foreach ($share in $shares) { $filename = $share -replace '\','_' �...
I was given a text file with NTIDs that needed their HomeDirectory attribute change, so I did this: #import users $users = gc d*.lst #put them in a list for backup $x=foreach�...
The PCI police jumped us today to make sure we kept our vendors and contractors in the scope of PCI compliance. Many were over the 90 day cutoff to be in Active Directory, and many were up and ...
I have 2 lists in text files, and I want to know which are similar and different in each list. So do this: #pull in rons list and sort it/remove whitespace #pull in andys list an...
We need to find out all the users that have an “accountexpires” attribute greater than 90 days from today, so: Get-QAduser -sl 0 -DontUseDefaultIncludedProperties -IncludedProperties e...
So you’ve got ways of adding people to DLs, but be careful when do it. You need to specify EVERYONE you want in it and doing this is bad: Set-QADGroup -Identity $group -Member $sean So...
I couldn’t figure out, in the 20 seconds I spent, how to create a DL with a valid email address in the ADUC GUI, so I went to my friend Powershell with this one: $user='sentryXMLNotifs' new-q...
I came across a situation today where I got bombarded with 100s of PDF attachments in email that I needed saved to save each to a folder to process. Opening each, right clicking and saving them...
At the day job, we routinely clean out the stale users, but seem to neglect the stale groups - I think the fairest way to start cleaning them up is to see which groups have no members in them, an...
There are again, a handful of ways to do anything with Powershell, and here are a few different ways to create bulk users in AD. Way #1: Use the native DSAdd call: $count = 1 while ($count�...
AMoRPH.US: PowerShell Consulting : ihunger : > PowerShell MVP Don Jones has a new article about the growing need > for PowerShell consultants - PowerShell experts to help�...
I had a scenario where we made some Active Directory changes via the Quest Get-QADUser command we wanted reversed because it didn’t act the way we thought it would. We wanted to set the passw...
We ran this to reset some password expiry issues: Import-Csv "Test.csv" | foreach {Get-QADUser -SamAccountName $_.SamAccountName | Set-QADUser -passwordNeverExpires $true} but got no...
Yea, it’s weird - I was just messing around in a virtual environment I stood up and was going to try to move FSMO roles with Powershell. The first thing to do was to make sure ADWS was instal...
So I installed the new fancy PowershellASP v3 today from nSoftware.com to try out querying AD from a webpage, and with Win2008R2 you get the activedirectory cmdlets in Windows, so this will work...
Use PowerShell to Data Mine Your Outlook Inbox - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs