powershell
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 …
Show meeting details for an Office 365 Room calendar
The default behavior in Office 365 is to only show meetings in room calendars as ‘busy’ – sometimes you want people to be able to see the details. This is easily changed through a couple of lines of PowerShell. This is caused by the permissions on the ‘default’ user. Let’s look at the permissions – …
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 …
Unlicense Disabled Office 365 Users
We have a constant churn of staff, as does any large organisation. One of the challenges is to ensure that anyone who has left has their account disabled in AD. All good, we have that process. We also use Azure AD Sync to sync users to our Office 365 tenant. Disabling a user however, does …
Force SCCM Client to perform an inventory
Recently we needed a quick solution to remotely force SCCM clients to perform a Hardware/Software inventory. I found some code here that I have modified slightly to wrap it in a GUI (Our Config manager doesn’t like command line!) As you can see, you have a range of options, and it is simply a case of entering …
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 …
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, …
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 …
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 …
You must be logged in to post a comment.