Setting Printer ACLs via PowerShell

I have been looking for a way to set the "Manage Printer" and "Manage Print Jobs" permissions using PowerShell. I created the following PowerShell function that works well and takes a Active Directory group name as an input.

function Set-PrinterPermission {
param (

$GroupSID = (Get-ADGroup -Identity $adGroup).SID
$SDDL = (Get-Printer -ComputerName $server -Name $printerName -Full).PermissionSDDL
Set-Printer -ComputerName $server -Name $printerName -PermissionSDDL $SDDL

# Wait for a brief moment to allow the permission change to take effect
Start-Sleep -Seconds 2

$updatedSDDL = (Get-Printer -ComputerName $server -Name $printerName -Full).PermissionSDDL

if ($updatedSDDL -eq $SDDL) {
Write-Host "Printer permissions set successfully for $adGroup"
else {
Write-Host "Failed to set printer permissions for $adGroup"

This function can be called with the following code

Set-PrinterPermission -adGroup "YourADGroup" -server "ServerHostName" -printerName "YourPrinterName"
Posted by Haydn Cockayne in Windows, 0 comments

Expanding the Root Partition on an Ubuntu Azure VM

By default Ubuntu IaaS virtual machines on Azure come with a 30GB OS disk.
The easiest way to enlarge the root partition after increasing the OS disk size is to run the following two commands:

sudo growpart /dev/sda 1
sudo resize2fs /dev/sda1
Posted by Haydn Cockayne, 1 comment

Interesting VHF/UHF Frequencies in Perth

While there is a wealth of information on the warsug forums, some of the content is quite old and hard to tell if it is still active, I have compiled a list of active frequencies. I live in Perth’s southern suburbs so your milage may vary.

Frequency Description
 418.275 TransPerth Security
 418.700 TransPerth Trains Control
 163.675 DFES 6AR
 473.250 Possibly Canningvale/Success Area Busses
474.750 Possibly Armadale Area Busses
489.500/480.200 Swan Taxis
489.75 Black and White Cabs
472.800 Channel 7

If you have any favourite frequencies please leave a comment below, another great resource is the ACMA’s Site Location Map, you can also turn on filters to only show licenses within your radios frequency range.

Posted by Haydn Cockayne in Scanning, 3 comments

Peer-to-peer AirPlay

A major feature in iOS 8 and Yosemite is the ability to connect to an Apple TV whilst not being on the same wireless network. The underlying technology for this is peer-to-peer AirPlay. Peer-to-peer AirPlay adds some great improvements to the old style AirPlay, if both the Apple TV and iOS or Mac support peer-to-peer they will connect this way even if they are both on the same wireless network. This removes the strain of video streaming from networks, and also improves the reliability of AirPlay streaming. Peer-to-peer AirPlay needs no configuration.

Peer-to-peer AirPlay requires the following:

  • Apple TV 3rd Gen (Rev A) – Model Number A1469
  • Mac from 2012 or later, running OS X Yosemite. Some unsupported models can be enabled by using the Continuity Activator.
  • iOS Device from 2012 or later, running iOS 8

Apple also recommends not using the 149 or 153 5Ghz wireless channels on your infrastructure wireless networks, not using these channels will eliminate any interference between the Apple TVs network and your wireless network.

Further information can be found in this great reference page from Apple.

Posted by Haydn Cockayne in Apple, iOS, OS X, 0 comments

Powering a Mikrotik RB2011 using a Ubiquiti EdgeSwitch

Using the passive PoE Mode on the Ubiquiti EdgeSwitch range, I was able to power a Mikrotik RB2011iL. The Mikrotik’s ETH1 port accepts  7 – 31 volts on pins 4, 5 (+), 7 and 8 (-), this matches up with the 24 volts which the Edgeswitch provides on the same pins. This is super handy due to the fact that this Mikrotik model does not have a normal IEC C16 plug and requires an external power supply if you’re not powering via PoE.


Posted by Haydn Cockayne in Mikrotik, Networking, Ubiquiti, 1 comment
Load more