WSUS Reset and Re-Authorize

Recently I came across  a customer site where a lot of the machines had stopped receiving updates from WSUS, despite being visible in the WSUS console and having shown as reported in. I decided to write a powershell script to parse all the machines in AD, stop the Windows Update service, delete the SoftwareDistribution folder, … Read more

A sensible approach to Windows 10 Update Delivery Optimization

Sadly, there has been a lot of scaremongering and bad advice floating around following the release of Windows 10. One of those ‘concerns’ is centered around Microsoft’s new Windows Update Delivery Optimization (WUDO) which is initially designed to help users get faster software updates and in theory is a good idea, being able to handle massive internet traffic of … Read more

Disable Windows 10 Wi-Fi Sense sharing feature

  Windows 10 has a new feature called WiFi Sense that has stirred up a bit of a storm on the internet, as it shares your WiFi connection details with all your Facebook friends, Skype contacts and other social media friends, even your outlook contacts. Now, just because you may ‘friend’ someone on Facebook doesn’t … Read more

Installing SCCM 2012R2 Clients

There are many articles on the internet on how to push the SCCM client to clients/servers, but not all of them go into the pre-requisitse: If you have not set up an account for client push installations (and I suggest you do) the computer account of the SCCM server will be used. This must have … Read more

Chrome white screen when using through TeamViewer

I recently had an issue where trying to use chrome over a TeamViewer session resulted in a white screen. This can happen if there is no physical display attached to the computer you are accessing, or if say, the laptop lid is closed. Chrome tries to render using the GPU to a display that doesn’t … Read more

Windows Password Roll Script GUI

Back in may 2014, Microsoft released a patch to fix a vulnerability in Group Policy Preferences which left many people without a method for changing local account passwords. Happily, they also provided a powershell script to allow sys admins to do this. Whilst the script works, it isn’t very elegant or user friendly, indeed one of … Read more

SCCM Client Cache Size

Recently I came across a situation where one of my SCCM deployments was failing due to the client cache being too small, now for new machines you can set this in your client installation settings, but for existing machines I needed another solution. For this, I created a small powershell script: $Cache = Get-WmiObject -Namespace … Read more

How to unzip files in powershell

function Expand-ZIPFile($file, $destination) { $shell = new-object -com shell.application $zip = $shell.NameSpace($file) foreach($item in $zip.items()) { $shell.Namespace($destination).copyhere($item,16) #16 answers Y to any prompts, eg overwrite } } #call the function so: Expand-ZIPFile -file “c:\myfile.zip” -destination “d:\somedestination”  

Windows Environment Variables

Variable Typical value (may vary) %ALLUSERSPROFILE% C:\ProgramData %APPDATA% C:\Users\(username}\AppData\Roaming %CommonProgramFiles% C:\Program Files\Common Files %COMPUTERNAME% {computername} %COMSPEC% C:\Windows\System32\cmd.exe %HOMEDRIVE% C: or sometimes D: %HOMEPATH% \Users\{username} %LOCALAPPDATA% C:\Users\{username}\AppData\Local %PATH% Varies. Includes C:\Windows\System32\;C:\Windows\ %PATHEXT% .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC %ProgramData% C:\ProgramData %PROGRAMFILES% Directory containing program files, usually C:\Program Files %ProgramFiles(x86)% In 64-bit … Read more