Packet sniffing your UniFi Access Points

We had a new Widget arrive in the house recently, and it required a connection to the Wi-Fi network. It was duly connected to the untrusted ‘IoT’ network, where it’s denied Internet access by default. It WASN’T happy. The supplier assured me it *didn’t* require Internet access, so I set about finding out what was …

Continue reading ‘Packet sniffing your UniFi Access Points’ »

Invoke-ConditionalShutdown.ps1

Windows natively won’t let you schedule a system shutdown, but there are plenty of posts on the Internet that show you how to create a Scheduled Task that will do that for you. Having recently added a solar+battery setup to our home, I’ve been on a (belated) mission to reduce our overnight power consumption, and …

Continue reading ‘Invoke-ConditionalShutdown.ps1’ »

Use PowerShell to clear stubborn file attributes

For several years we’ve used a basic data backup program that exploits the archive bit on files to determine if they need to be backed up or not. We run a weekly full backup with daily differentials. After the weekly backup is run, the archive bit is reset on all files, ready for the next …

Continue reading ‘Use PowerShell to clear stubborn file attributes’ »

List all SfBS & SfBO policies by type

Here’s a “one-liner” I came up with this week that dumps ALL of the SfB policies in your system ordered by type: PS C:\> Get-Command -Module SkypeForBusiness Get-Cs*Policy | where-object {$_.Name -ne “Get-CsEffectivePolicy”} | ForEach { invoke-expression $_.name } | ft @{Label=”Policy type”; Expression={($_.getType()).ToString().Split(‘.’)[-1]}}, identity -auto This is what it looks like here in the …

Continue reading ‘List all SfBS & SfBO policies by type’ »

Begin-Process-End in a PowerShell script

Much has been written about how you need to use Begin/Process/End blocks in order to handle a collection of values passed from the pipeline, but those posts all seem to focus on how to do it in a *function*, not a script. I recently struggled to figure out how to retrofit this functionality into one …

Continue reading ‘Begin-Process-End in a PowerShell script’ »

Test-CsDatabase shortcuts

I don’t know about you, but I’m not getting any younger, and my eyes often glaze over when faced with a table of numbers to compare for differences. This is often the case when I issue one of my fave p$ shortcuts to test my SfB server’s databases: Test-csDatabase -LocalService | ft *name,*edver* Do this …

Continue reading ‘Test-CsDatabase shortcuts’ »

Compare-Objects.ps1

Hands up if you’ve tried to compare 2 objects of some type to see what – if any – differences there are between them? I tried and gave up. PowerShell’s native “Compare-Object” isn’t very helpful. It will tell you IF there’s a difference, but it’s not particularly forthcoming. Borne of that experience comes “Compare-Objects.ps1”. You …

Continue reading ‘Compare-Objects.ps1’ »

Adding Direct Trunk Select to Skype for Business

At about the same time any given Skype for Business deployment gains its second PSTN gateway / Session Border Controller, the old diagnostician in me wants a means to be able to directly send calls to each one individually. By being able to directly focus my outgoing calls on just one SBC I can confirm …

Continue reading ‘Adding Direct Trunk Select to Skype for Business’ »