AWS Workspaces – Clean up orphaned Managed AD objects

If you manage a large number of AWS workspaces, chances are you will end up with orphaned computer AD objects cluttering up your domain. This script pulls a list of workspaces, compares it to the list of machines in AWS managed AD and removes any AD computer object without a corresponding workspace. This script requires …

Read moreAWS Workspaces – Clean up orphaned Managed AD objects

Tidy up Always on VPN Connections

We recently moved from a test to live implementation of Always on VPN, and moved our servers behind a load balancer, ratifying out profiles down to a single user and device tunnel. We found that deleting the old connections from Settings still left a bunch of stuff in the registry, so I came up with …

Read moreTidy up Always on VPN Connections

Always on VPN – RAS service hangs with no errors in Event log

We hit a new issue this week, we were getting failed connections on our Always-on VPN RAS servers, and on checking the servers, it appeared the ras service had hung. No errors in the logs, existing clients dropped off and we couldn’t restart the service, a reboot was the only option. We tracked this down …

Read moreAlways on VPN – RAS service hangs with no errors in Event log

Removing Always On VPN Tunnels

Recently, we were in a situation where we needed to remove some left over Always-on VPN user tunnels from a lot of Windows 10 machines. (We had duplicate profiles, and this was a tidy up exercise) The following scripts address this issue, it gets a list of all the VPN connections and then removes all …

Read moreRemoving Always On VPN Tunnels

Robocopy – Throttle bandwidth

Ever thought how useful it would be to be able to throttle Robocopy to prevent it from hogging all your bandwidth when copying over a network, particularly a slow one? Well you can, using the /IPG (Inter packet Gap) command line option. Simply enter the values for your available bandwidth and how much of this …

Read moreRobocopy – Throttle bandwidth

Windows Client log management

One of our clients recently asked us to locally archive windows logs for 90 days – they didn’t want the expense of a log aggregator such as Logrhythm. The requirement was to retain 90 days of security and application logs (although you can expand the script to include others) in a compressed folder with restricted …

Read moreWindows Client log management

Script to remove files/folders from all local profiles

I had a requirement recently that required a folder and all files under it to be removed from all local user profiles on a machine – turns out this is really simple to do in powershell: # Get a list of all local profiles on the target machine # $users = Get-ChildItem c:\users # Now …

Read moreScript to remove files/folders from all local profiles

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 moreWSUS Reset and Re-Authorize

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 moreA sensible approach to Windows 10 Update Delivery Optimization

Hyper-V – Copying Files between a VM and the Host

There are several methods to achieve this, depending on the version of Hyper-V you are running. Whilst there is a common belief that files cannot be copied and pasted between the VM and the Host, this is not strictly true, we shall explore the ways you can achieve this functionality here: Use ESM (Enhanced Session mode) …

Read moreHyper-V – Copying Files between a VM and the Host