Archive for the ‘IT’ Category

Connecting to Azure with PowerShell

Thursday, January 25th, 2018

There’s been lots of posts about this in the past by various people so here’s my contribution.

Below is a screenshot of the steps I take.

You can see that I have powershellget installed as part of PowerShell but I don’t, yet, have the Azure module downloaded or installed so I Get that module and then I install that module.

I have had to force it to install alongside the one that’s already on my machine. When I run the Get-Module command, I still don’t “see” the Azure model and so I must import it at which point it is then available for use.

Once the module has been downloaded, installed and imported (the three steps that need to be performed when connecting for the first time) I can them move on to making a connection to Azure.

NOTE: Once the Azure module has been downloaded and installed, it only needs to be imported for future connections just like any other PowerShell module on your computer.

To connect in, I enter the “Login-AzureRMAccount” command which pops up the “modern” logon dialog box.

After being successfully authenticated, my subscription details are played back to me and I can then manage Azure from the command line.

Of course, the much easier way is to simply download the MSI installer from the Azure web site ( under the command line tools section ;>)

Hope this helps you out.

PowerShell Cheat Sheet

Tuesday, October 3rd, 2017

Nice handy chart with common commands and expression structures available to download from


Use SysMon and finding it hard going ?

Sunday, July 30th, 2017

Nifty little GUI to help you interpret that capture much faster

Royalty Free Images for Presentations

Thursday, July 27th, 2017

Need some high quality royalty free images for your presentations ? Why not try one of the following sites ?


Default NetScaler changes

Friday, July 7th, 2017

When deploying a NetScaler, Citrix recommend that you make these changes by default ( ).

The Windows Scaling one was particularly useful on a customer site recently where connections over CAG would drop due to window size on the TCP stream not being negotiated with the ASA filrewall correctly. Enable windows scaling and the issue went right away.

Configuring Anti-Virus for VDI

Monday, May 15th, 2017

While this article is specific to Microsoft Defender, it does give good recommendations as to how to configure any vendors A/V for a VDI environment.

Display make and model of server hardware

Tuesday, May 9th, 2017

Ever been in that place where you need to know that is the make and model of a server ? For documentation or planning purposes for example ?

You know, the time when you might have to work out what the power draw is of your hardware before moving into a hosted data center or know which spares to hold for physical servers ?

A quick way to get the make and model of the hardware is to run the command below:

wmic computersystem get Name, domain, Manufacturer, Model, NumberofProcessors, PrimaryOwnerName,Username, Roles, totalphysicalmemory /format:list

Geo Location Database

Saturday, April 15th, 2017

Need a free geolocation database ? Why not give the guys over at MaxMind a go ?

GeoLite2 Free Downloadable Databases

Create new contacts folder in users mailbox (Exchange 2010)

Monday, June 6th, 2016

In this post I’ll walk you through how to use PowerShell to create a new folder under the users contacts folder in Exchange 2010. I imagine this will also work for later version os Exchange as the command still exists in Exchange 2016.. but I haven’t tested it.

The things you need to make this work are:

  1. Rights to the users mailbox
  2. CAS stole installed
  3. Exchange PS-Snapin imported

If you have those 3 items, then it works fine.

So, the issue is that if you run the New-MailboxFolder command out of the box it wont work unless the snapping is installed so the first command you run from the Exchange Administrative Shell is

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

Even after running that command you will receive an error that says “Cannot open mailbox”


So, next we grant the account running the command access to the users mailbox.




If you want to do this using PowerShell (for all mailboxes perhaps) then you can run the command:

Get-Mailbox –result size unlimited | Add-MailboxPermission –User “domain\usernamerunningthecommand” -AccessRights “FullAccess”
To subsequently remove access to all mailboxes run the command:
Get-Mailbox –result size unlimited | Remove-MailboxPermission –User “domain\usernamerunningthecommand” -AccessRights “FullAccess -confirm:$false”
If you try and run the New-MailboxFolder command, you may still get an error.

This is due to the command being run on a non-Exchange server (perhaps a management workstation). if the command is run on a server with the CAS role installed, it will then execute fine.


Deploying a reg key with SCCM

Friday, June 3rd, 2016

One easy way is to create a batch file

In the batch file enter

regedit /f /s regfile.reg

the batch file can just be published as a standard package or application.

while the /f isn’t necessary, it does force an overwrite of any pre-existing keys and so can be useful if you want to correct some keys rather than simply adding them.