I wanted a place to share toolboxes. Here seems good as any.
This is my printer toolbox:
Clear the printer Spooler
Get Mapped Printers
Get Shared Printers
Get Printers per user
Get Local Computer Printers
This is my Toolbox for checking and fixing computers with domain trust issues:
Check for trusted Domains
Repair Domain Trust
Reset Domain Trust
Rest domain trust is a powershell script. you will need to edit the username and password as well as the AD PDC.
These tools are used on clients that get untrusted domain errors.
Hi Darrell, the reset domain trust puts a file on the machine that I think is the one that needs editing but you can’t edit it once it is added to the toolbox. Can you provide just the resetdomaintrust.ps1 file separately so that it can be edited?
Thanks for posting these tools they were similar to the ones I have but I liked the “Per User” one! I never thought of that.
Just curious, where are you viewing the output of these? Typically I just type them by hand so I see the output on the screen. When I run your tools it just returns the result of 0 but cannot figure out where to view the output.
if you run the tool it also places a copy of it at c:\temp
It will return standard output data to simple help like a normal script. If it returns 0 it usually mean it ran successful just no data returned.
That usually means there is no printer that is installed that only that user can access.
What about running with “-verbose” to see a full return of data in SH
I am Curious what others have for windows update fixes. Here is my toolbox currently.
ToolBox for Windows Update Fixes:
Fix Client PIDS
WSUS Server Cleanup
Fix Windows tray notification bug for updates
Install .net 3.5 for client on Domain with WSUS enabled.
I have not found an easy to use, always works solution for fixing windows updates when they break. Interested to see what you all have.
Here is a PSWindowsUpdate script I have been playing with a little bit.
Can take a while to run, but the verbose reporting mostly tells you what’s going on.
Hey, guys. There is some good stuff on this thread and I wanted to share the tools that I’ve come up with!
UPDATED 05/06/20 to include resources for each toolbox!
- Clear Print Spooler
- CPUZ_x64, Knock, FTPS Inventory
- CPUZ_x32, Knock, FTPS Inventory
Somewhat specialized for my workflow, but could be modified for your purposes. Runs a CPUZ inventory, does a port knock to allow FTPS traffic through a router, and uploads the inventory txt file so I can analyze it later
- Port Knock YOUR_HOST
Performs a simple tcp port knock with TCP.exe on a firewall that’s configured to listen
- Delete Offline Files C:\Windows\CSC Folder
- Backup Offline Files (Skip PST Files), No NTFS Info
I’ve had the need to recover things from the C:\Windows\CSC offline files cache. This makes a copy of them for safekeeping as well as sets permissions on the copy so that you can easily access them
Interactive - All these generate prompts on the remote screen
- CPUZ_x64 Report
- CPUZ_x32 Report
These run a hardware inventory with CPUZ and pop up the resulting text file on the screen
- Open Control Panel
- Open Devices and Printers
- Open Computer Management
- Open Services
- Open Windows Update
- Disable & Re-Enable NIC
A handy script I wrote to allow for NIC troubleshooting when connected remotely. I use it sometimes when Windows NLA thinks the network is “public” instead of “domain” because disabling and re-enabling the NIC usually gets it to re-detect it correctly. The script disables a NIC, waits 20 seconds, and re-enables.
- Interactively Install WinDirStat
- Interactively Install Advanced IP Scanner
- Keep Computer Awake (Caffeine64 in System Tray)
- Windows Updates, No Reboot
- Windows Updates, Reboot (1m)
- Windows Updates, Reboot (5hrs)
- Windows Updates, Reboot (10hrs)
- Microsoft Updates, No Reboot
- Microsoft Updates, Reboot (1m)
- Microsoft Updates, Reboot (5hrs)
- Microsoft Updates, Reboot (10hrs)
My take on a silent Windows update solution tested with 7/8/10/2008/2012/2016/2019. It installs the PSWindowsUpdate PowerShell module and does things a little differently depending on what version of Windows is detected. I have varieties with different auto reboot options, and the script will check for and push along a pending Windows Update reboot when needed. I’ve also made discreet scripts for Windows Updates vs Microsoft Updates because sometimes I only want to patch Windows without installing Silverlight/SQL service packs.
- Resync NTP Time
- Set Windows Server Time NTP Sync
Set a Windows computer to sync time with ntp.org time servers. This is particularly helpful when a Windows domain gets out of sync and users complain that their clocks are off. Just run this baby on their PDC Emulator FSMO role holder and run the resync tool or reboot their domain-joined computers! NOTE: I’ve tested this on a few versions of Windows Server and it does work despite certain versions throwing an error.
I was able to find the PSWindowsUpdate.zip file from technet, but not the legacy update bat file. Can you throw those in the google dirve?
BTW, the scripts are AWESOME!
I found that I has having allot of errors where the Windows Update was failing on some of my systems. i found that I had actually provide the full path on the import-Module command. Have you seen this error on your side was well?
Import-Module ‘C:\Program Files\WindowsPowerShell\Modules\PSWindowsUpdate\PSWindowsUpdate.psd1’
Hey, Ted. Sorry, I thought that the resources associated with each tool would come through when I exported. I’ll upload all resources for my scripts to my Google drive folder later today.
As for the Windows Update errors, I have not had any issues. In the simple help tool are you specifying a working directory? I set all of my tools to use %SYSTEMDRIVE%\SHTools
EDIT: After re-reading your message it looks like that’s probably not the problem. Weird. I’ve tested it on a lot of different systems and haven’t come across that yet but I’m glad you found a solution in specifying the full path.
Thank you all for sharing !
I wanted to share my new Toolbox.
Its for finding locked users and unlocking them in AD.
I used the new Scripting api to prompt the tech for what user to unlock.
Rsat tools will need to be installed on whatever computer your running the script on.
Hey that was a cool toolbox. I did look at it and ran into an error on the unlock user. I updated your script so that it works. See below.
$UserToUnlock = ServerUtilsAskTech(AD Username to unlock:,text,username,required)
Unlock-ADAccount -Identity $UserToUnlock -verbose
NOTE: I’M NOT A POWERSHELL GURU, JUST A NOOB SO DON’T YELL AT ME IF I DID SOMETHING WRONG!
Lol. Me neither. I like that better anyways
Did you ever upload those resources David?
Sorry, Ted. I finally updated my drive folders, and added one more toolbox (NTP Tools). Check my original post!
I did! Sorry for the delay. Check my original post which I just updated.