Archive for the ‘IT’ Category

PowerShell Cheat Sheet

Tuesday, October 3rd, 2017

Nice handy chart with common commands and expression structures available to download from http://ramblingcookiemonster.github.io/images/Cheat-Sheets/powershell-cheat-sheet.pdf

 

Use SysMon and finding it hard going ?

Sunday, July 30th, 2017

Nifty little GUI to help you interpret that capture much faster

https://nosecurecode.blog/2017/07/29/visualizing-tracking-sysmon-events-with-sysmon-view-1-2/amp/

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 ?

http://pixabay.com

http://unsplash.com

http://freeimages.com

Enjoy.

Default NetScaler changes

Friday, July 7th, 2017

When deploying a NetScaler, Citrix recommend that you make these changes by default (https://support.citrix.com/article/CTX121149 ).

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.

https://docs.microsoft.com/en-us/windows/threat-protection/windows-defender-antivirus/deployment-vdi-windows-defender-antivirus

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”

error1

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

 

error2

 

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.
error3

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.

error4

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.

Extract ProxyAddresses to a CSV file

Tuesday, May 10th, 2016

The code snippet below will allow you to extract a users proxy addresses, one per line, to a CSV fie ready to import into a foreign exchange system.

 

$recordset = get-mailbox -resultsize unlimited | select samaccountname, displayname, emailaddresses

$result = @()

foreach ($record in $recordset) {

foreach ($address in $record.emailaddresses) {

$add = $record.samaccountname + “,” + $record.displayname + “,” + $address.proxyaddressstring

$result += $add

}

}

$result | out-file c:\support\alladdresses.txt

 

 

When importing into the other system, you may want to convert SMTP (uppercase) to smtp (lowercase) and similar for X400, X500 and SIP addresses or ad .tolower() to $address.proxyaddressstring when extracting the addresses above.