Along with PowerShell and Group Policy, I am in and out of the command prompt all day! Unlike those previous tools, I tend to use CMD in spurts. I might open it real quick on a test machine or use it to troubleshoot a client. To make life easier, I regularly use these 4 tricks to get to the administrative command prompt!
Category Archives: Quick Tip
These short posts show how to do something very simply!
Group Policy Verbose Mode: The One Group Policy Setting That You Need to Enable
Group Policy is an extremely flexible and complicated tool. One question I am asked quite a bit is, “Can you give me a list of settings I need to enable?” The short answer is No, Microsoft has already enabled the vast majority of things that should be enabled. And while Microsoft’s guidance may change over time (see Offline Files as an example of this), most settings stay the same. There is one setting, however, that is not enabled by default. If you are going to use Group Policy and want to make your troubleshooting life easier, you will want to enable it.
Spring Cleaning for a Desktop Adminstrator
Have you got that spring cleaning itch yet? I’m not talking about cleaning the kitchen or pressure washing the house; I am talking about cleaning up your Desktop Administrator life!
To help you with those spring cleaning chores, I’ve written or collected a series of scripts for you:
Active Directory:
- Deleting Stale Computers
- Deleting Stale Users
- Deleting Empty Security Groups
- Enabling Accidental Deletion
Printers:
If you would like to see more scripts or another area to cleanup, let me know! I will see what I can do!
Delete Empty Security Groups
As part of our spring cleaning series, I have a quick tip for you to delete all empty security groups.
Get-qadgroup -SearchRoot "DC=Test,DC=local" -SearchScope Subtree -empty $true | Remove-QADObject -whatif
That’s it! For safety, I added the -whatif parameter. It will simulate the deletion but not actually delete anything. If you are worried that your groups are used for shares, you can find out by using this PowerShell Script. If you would like to test your group deletion without messing anything up, switch the group type from security to distribution. If no one complains after a month, you can delete it then. As always, happy scripting!
(Re)Installing the Microsoft XPS Printer
In all of my brilliant wisdom, I thought it would be a wise idea to remove the Microsoft XPS Document Writer from all of my machines.
Why did I do this? Well – three years ago, I had a site that switched to Windows 7. A common complaint was that their default printer would sometimes change to the XPS document writer and the user didn’t know where that printer was located. It was useless to explain that it was a “fictional” printer so I did the logical thing and deleted the printer using Group Policy Preferences. Boy was I dumb! Until now, I thought I was stuck with that change.