A large number of my scripts involve picking an Active Directory Organizational Unit (OU). I have been using Out-Gridview for OU navigation. This is because I was unable to find a form based GUI OU picker that worked fast enough in my very large AD environment. The scripts I have seen tended to collect all objects at…
Author: Alan
Adding Code to Outlook Mail Messages
I frequently send short PowerShell scripts in the body of Outlook messages. The spell checker makes the text look lousy. This tip will allow you to copy code from the PowerShell ISE (or other code editor) and insert it into an Outlook message with color intact and without spell checking: Create a new email. Set…
How to Edit the Path for Shares and Printers inside a GPO
Here is the unsupported method from Microsoft for editing the path for shares and printers inside a GPO. From a server — 1) Backup the problem GPO to your desktop 2) Edit the gpreport.xml and backup.xml files 3) Import the edited GPO The engineer said if you have to do both, update the path for…
Yes, I support HTTPS
It seems silly to add a certificate to my website, except for entry to the admin console. But Google ranking is affected without it, and so I have added it.
Finding Rarely Used Computers On Your Network
I support a number of hospitals. Many of these have very large facilities, where the placement of computers was originally done by a space planner or others trying to make an educated guess about how and where people would be working. Frequently we find that there are computers which are unused or only rarely used. …
How to Create Single SCCM Bootable Media for both X32 and X64
My friend, Nick Miller, has gone to work with another company, and is involved in a Windows 7 image standardization project. He recently told me that he had figured out how to have a single bootable USB WinPE disk to create both 32 bit and 64 bit OS images. Nick is a smart guy, and…
Get Oldest Windows Event
Get-OldestEvent.ps1 is a PowerShell advanced function which returns the oldest event from a Windows computer event log, and will help you determine the rollover time for an event log by also returning the age of the record as a time span with the time created. Optionally you can return the entire oldest record with the…
Manage the Outlook Attachment Folder with PowerShell
If you are using Outlook, every attachment you have ever opened is still on your hard disk. To see these files, paste this into to the Windows “Run” command box: %UserProfile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\ What you will see is one or more sub-folders which contain the attachments from previously opened emails. These files take up unnecessary…
Passwords for Password Resets
I discovered that my script to generate passwords, RandomPW.vbs, isn’t popular with users because the passwords are random. I have an even more complicated but unposted PowerShell version with the same issue. I wanted to create something that was easier for the help desk and users. Get-TempPW.ps1 is my answer to those objections. This script…
Get the Parent OU for an AD Object
I have mentioned before that the Charlotte PowerShell User group was frequented by Scripting Guy Ed Wilson, and his wife Teresa. I’m sad to say that they have moved away, but am happy that Brian Wilhite has been running the meetings since. I mentioned to Brian that I had a cool way to get the…