Force Manual Synchronisation When Using Azure AD Connect

The method to force a synchronisation of you on premise active directory with Office 365 has changed from the method previously used with Dirsync when using the newer Azure AD Connect. In order to force a synchronisation you now need to navigate to:

C:\Program Files\Microsoft Azure AD Sync\Bin 

Then run:

DirectorySyncClientCmd delta

Determine Which Version of Powershell is installed

If you need to find out which version of Powershell is installed on a machine simply open Powershell and type:

$PSVersionTable.PSVersion

Find Out if an Update, Hotfix or KB is installed on a Windows Server Using Powershell

In Powershell versions 2 and above you can use the get-hotfix command to determine whether a particular update, KB or hotfix is installed on a Windows Server or client. Simply open Powershell and run the following command:

get-hotfix -id KBxxxxxx

Where KBxxxxxx is the name of the update you wish to search for.

Windows Backup encountered an error. There is not enough space on the disk

Under normal circumstances Windows Server Backup should manage disk space and remove the oldest backups automatically. This works fine normally but the other day I discovered that one of my servers had not been backing up due to the following error:

“Windows Backup encountered an error while writing to the backup target. Detailed Error: There is not enough space on the disk”

For a detailed explanation on how Windows Server Backup manages storage space please refer to the following link:

http://blogs.technet.com/b/filecab/archive/2011/03/14/windows-server-backup-automatic-disk-usage-management.aspx

It turns out the backup disk was so full, there was not enough space to run the backup. In order to clear the oldest backups, keeping the number of backups that you require use the following command:

wbadmin delete backup -keepversions:X

Where X is the number of backups that you want to keep. For example if you wanted to keep the last 30 backups use:

wbadmin delete backup -keepversions:30

Delete Temporary Internet Files in All User Profiles

Yesterday one of my Citrix Servers was running low on disk space, and I realised that temporary Internet files in various user profiles were using up a lot of disk space. Looking for an easy way to clear these out of all profiles I came across the icsweep utility from Ctrl-Alt-Del. This is a fantastic tool that can be used to delete temp files and/or temporary Internet files from all user profiles that are not currently in use. To assess how much space is being used by these files simply run:

icsweep /SIZE

To delete temporary Internet files only run:

icsweep /TIF

and to delete temp files only run:

icsweep /TMP

Both temporary Internet files and temp files can be deleted by running:

icsweep /ALL

WSUS Server Cleanup Wizard hangs at “Deleting unused updates” stage

Last week i was checking some of my replica WSUS servers, and I discovered that some of them hadn’t synchronised with the upstream WSUS server for a few weeks. When looking in the synchronisation log I was presented with the following error message:

An error occurred with the server’s data store.

And when I clicked on “Details”, this message was displayed:

SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

As some of the WSUS servers had been synching OK with the upstream server I ruled out any corruption at that end. Apparently this error can occur if the server cleanup wizard has been run on the Master WSUS server, but not on the replica. As a result I decided to run the WSUS server cleanup wizard on each of the replica WSUS servers that were having problems synchronising with the master server. Most of these ran through fine, but a couple of the replica WSUS servers hung on the “Deleting unsused updates stage” and therefore the server cleanup wizard could not complete. I had seen this issue before while dealing with a different problem previously, and knew that it could be resolved by running the server cleanup wizard elements in a specific order, which is as follows:

Pass one:

Select option 2 only “Computers not contacting the server”

Pass two:

Select option 4 only “Expired updates”

Pass three:

Select option 5 only “Superseded updates”

Pass four:

Select option 3 only “Unneeded update files”

Pass 5:

Select option 1 only “Unused updates and update revisions”

Running the cleanup wizard with the options above fixed the issue and subsequently the replica servers happily synchronised with the master server once again. Please note even running the server cleanup wizard in this way, pass five can still take a considerable amount of time to run, but it has always succesfully completed for me. On one of the servers I even had to leave this running over night.

Remotely manage a Sonicwall firewall over a VPN tunnel

Earlier I was looking to remotely manage a Sonicwall firewall via HTTPS over a VPN tunnel that I had established to the device. In order to do this firstly select ‘VPN’ in the Sonicwall’s menu, the ‘Settings’ section should then be highlighted. Click the ‘configure’ button for the VPN tunnel that you want to manage the device over, which will open the settings screen for that VPN Policy. Next click the ‘Advanced’ tab, and look for the section labelled ‘Management via this SA’.  Check the boxes for protocols that you wish to manage the device over, and click OK, as shown below.

Allow remote management via HTTPS and SSH over a VPN tunnel on a Sonicwall Firewall

Allow remote management via HTTPS and SSH over a VPN tunnel on a Sonicwall Firewall