Posts

SCUP, WSUS, Dell and Error 0x8024000f

Update: See bottom of post for another variation on this. Now here was a real barrel of laughs to track down and fix. The setup: Import the Dell Client catalogs into SCUP 2011 Publish them all to WSUS with automatic (effectively metadata only) Check for updates from a client machine Get Error 0x8024000f in Windows update Upshot of this is that WSUS is broken and by extension, so are software updates via SCCM. The culprit? Circular references in Dell's update catalog. How to fix: Turn on verbose logging for WSUS on a client PC  http://support.micro...723#letmefixit2 Check for updates Open c:\windows\windowsupdate.log Search for the word "cycle" Get the update ID that has the circular reference Find that update in SCUP and expire it (you may want to fix it, but I didn't bother as I don't need the affected updates) Publish the update again Go back to step 2 and keep repeating until Windows Update on the client PC works (I had about 8 wi...

Setting Wallpaper for a Remote Desktop Session

Ah, the fun I had trawling around trying to find out how to set the wallpaper on a remote desktop session! The (seemingly) most obvious answer was changing the Wallpaper setting under Desktop in a GPO, but no. That setting explicitly states that it doesn't apply to RDP sessions, so back to the registry we go... I'm presuming here that we want these settings to apply to all the computers within a specific OU rather than to individual users. Create a new GPO "Wallpaper" Navigate to Computer Config/Policies/Admin Templates/System/Group Policy Set "Configure user Group Policy loopback processing mode" to Enabled with Mode as "Merge" Navigate to Computer Config/Policies/Admin Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Remote Session Environment Set "Always show desktop on connection" to Enabled Set "Enforce Removal of Remote Desktop Wallpaper" to Disabled Navigate to Computer Con...

Monitoring rotating text files in real time with Powershell

So I needed a way to monitor some log files in a folder where a new log file gets created when the current one gets too large. All I'm interested in is checking the latest one for certain strings and then alerting if they occur. Powershell to the rescue: #folder to be watched $folder = 'C:\Temp\logger' #file types to be watched for $filter = '*.log' # <-- set this according to your requirements #strings to find in log $matchstring="My matching string" #variable to hold background powershell job $catjob #start a cat task as background process Function StartCat ($filepath) { #stop job is already monitoring a file if ($Global:catjob -ne $null) { stop-job -job $catjob remove-job -job $catjob } $scriptblock = { param ($file, $matchstring) cat $file -wait | ?{$_ -match $matchstring} } #start new job when file changed $Global:catjob = sta...

Wildcard Subdomains in Windows DNS

On a test web server you may have the need to host multiple websites under several subdomains: site1.server.domain.local site2.server.domain.local site3.server.domain.local Setting up the host headers is straightforward, but a bit of work is required in Windows DNS to get the subdomains working correctly. Launch DNS console Expand Forward Lookup Zones Right click on your domain and click "New Domain" Enter the name of your server (if that's what you're using as the top level of the sub domain) Right click the new domain and click "New Host (A or AAAA)" Enter "*" (without the quotes) for the name and then the IP address of your server Click OK On the server in a raised cmd prompt:  ipconfig /flushdns ipconfig /registerdns All done and your your subdomains will be resolved.

Cleaning up Sharepoint 2013 backups

Sharepoint is pretty horrible when it comes to backups, but presuming that you're doing Farm backups rather than just your content database, you'll have to deal with them. I do one full backup per week and differentials in between from Task Scheduler. This generates a lot of data that needs cleaning up, so here's a bit of script. Most of this is directly lifted from a script by  Meat Head Nerd  which I changed to look at the full backups rather than just age of backup. This will remove all full and differential backups prior to the number of full backups you want to keep. # Number of full back ups you want to keep $numfullbackups = 1 # Import the Sharepoint backup report xml file $spbrtoc = “c:\temp\spbrtoc.xml” [xml]$sp = gc $spbrtoc # Find the full backups in spbrtoc.xml $fullbackups = $sp.SPBackupRestoreHistory.SPHistoryObject | ? { $_.SPBackupMethod -eq 'Full' } # Get the start time of the last full backup $lastfullstarttime = $fu...

When SCUP 2011 Cleanup Wizard won't clean up...

In SCUP 2011, there's the Software Update Cleanup Wizard which will remove from WSUS any updates that are no longer in SCUP. Only one problem: if the update exists in WSUS, but the content isn't in UpdateServicePackages, the clean up fails as it can't verify the signature of the cab file. As the wizard doesn't care about the content of the file, it's quite easy to fool it. Open SCUP.log and find the error Create a folder in UpdateServicePackages that matches the folder of the missing content. e.g. \\WSUS01\UpdateServicesPackages\7d0f53e4-482e-462d-b81b-127941c32091 Find an existing cab file within the UpdateServicePackages folder and copy it into your new folder Rename the copied cab file to the name of the missing cab in the SCUP folder Run the SCUP Cleanup Wizard again Clean up success! Seems like a bug to me as removing the entry from the WSUS database shouldn't really care if the content exists.

Locking workstations through GPO

Using GPO to lock workstations after a period of inactivity should be standard behaviour in any organisation, but unfortunately the internet is littered with old information about how to do this. So, ignoring anything to do with screensavers, g o to: Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options Set Interactive logon: Machine inactivity limit to whatever timeout period you require Amazing how long it took to find this. H/T:  MS Forum  and the guy who answered it  Deploy Happiness

Popular posts from this blog

Avoid Microsoft Intune if you use G-Suite and Android

Setting Wallpaper for a Remote Desktop Session

DFS "Waiting for Initial Replication"