Looking for a script to run Windows Update remotely? WindowsUpdate.hta version 3.1 is an HTML application which allows you to connect to a remote machine, determine what patches it requires from Windows Update, and install the patches. You can schedule a reboot time. This version allows you to look at he Windows Update log, and the log created by the program itself. There is a button to allow you to change the update source to windowsupdate.com, which is helpful in places where WSUS or SUP is not working properly. You can install all security patches, or select patches individually.
HTA files are best run from your local drive. Version 3.0 was released in 2011, version 3.1 only changes the background color to blue. The transition color method I had used for the background is no longer supported in IE, and the program appeared to be broken.
Change _hta.txt extension to .HTA.
Although I have spent most of my time recently writing PowerShell code, I still get requests from the field for vbscripts. The security model differences make it more time consuming to explain how to run a PowerShell script than vbscript’s “double click this”. DisablePCsFromList.vbs is an updated version of a 2006 vbscript which reads a text file with a list of computer accounts, and deletes the list. A log file is written to the user desktop.
I was reviewing my blog stats today and found a link from a site in UK to my version of ScriptoMatic.hta. I have upgraded my home laptop to 8.1, and decided to see whether it still works (it does). If you launch the “fixed” ScriptoMatic as an ordinary user, it takes a very long time to load. But after it did, I found that it worked just fine. I began reviewing the WMI classes listed, and found one that I had not noticed before, Win32_ReliablityRecords. This class, introduced in Windows 7, gives you a list of failed installs, system hangs, and application crashes in an easy to read format.
Scriptomatic created a nice vbScript to enumerate the class. I coded Get-ReliablityRecords.ps1 in PowerShell with one-third the lines including comments. It has only basic parameters. You may choose a remote computer and a limit on the records returned.
I frequently get a request to delete a list of computers in my AD domain. Often the list is in an email. Delete-PCListFromClip.ps1 is a short script which reads the content of the clipboard, then sends the list to Out-Gridview for review. You may then select the computer names for deletions. PowerShell 3.0 and the ActiveDirectory module are required.
I’ve updated one of my favorite and most used PowerShell Scripts, Convert-ADValues. Read the revised post, here.
I thought that the Windows Experience Index was pretty useless until I wanted to compare the speed of systems that I was preparing to donate. One had Windows 7, the other was a lab PC running Windows 8.1. I was surprised to find that I could not find the Windows Experience Index (WEI) on the Win 8.1 computer. The WEI is calculated by Windows using the Windows System Assessment Tool (WSAT), (see: http://en.wikipedia.org/wiki/Windows_System_Assessment_Tool for a good overview). The attached script requires PowerShell 3, and so run natively on Windows 8 and 8.1. What it does is permits you to see your current WEI for your Windows 8.1 computer. This is written for people with an understanding of PowerShell. If you have your execution policy set to unrestricted, you may find that Get-WINSATScore.ps1 is easiest to run from the ISE.
Written to replace DelProf, this script deletes inactive user profiles from a local or remote computer. It supports arguments by position, and has a test parameter. If you run it locally, you may supply host name, localhost or “.” The logfile is tab delimited, you may use XLS extension to open in Excel. If you run the script interactively the log opens when the action is complete. This is written to be loaded with “dot sourcing”, ex:
PS C:\>. "c:\mypsscripts\Delete-InactiveProfiles.ps1"
After you have loaded the module you can use Get-Help Delete-InactiveProfiles.ps1 for more information on syntax.
Delete-InactiveProfiles.ps1 is heavily commented so you can see what it is doing. I am using WMI to get the list of local users, and query NTUser.DAT for last logon time. Remember to rename from Delete-InactiveProfiles_ps1.txt to Delete-InactiveProfiles.ps1.