Deploy uBOL via Intune (Edge and Chrome)

Chome:

Intune -> Configuration Policy -> Win 10 and Later -> Settings Catalog -> Add -> Google Chrome Extensions -> Configure the list of force-installed apps and extensions AND Extension Management Settings

Add the uBOL extension ID to be installed, and set the Extension management Settings for pinning – {"ddkjiahejlhfcafbddmgiahcphecmpfh": {"toolbar_pin": "force_pinned"}}

Screenshot of Intune settings showing the Google Extension settings required

 

Edge:

Intune -> Configuration Policy -> Win 10 and Later -> Template -> Administrative Templates ->  Microsoft Edge -> Computer Configuration -> Extensions Control which extensions are installed silently AND Configure Extension Management Settings

Add the uBOL extension ID to be installed, and set the Extension management Settings for pinning – {"cimighlppcgcoapaliogpjjdehbnofhn": {"toolbar_pin": "force_pinned"}}

 

For both, deploy the script for exclusions and disable the first run.  See https://pastebin.com/2GCJ4YpF for the script.

Add storage and format disk in Debian

sudo fdisk -l
# take note of the added disk
sudo fdisk /dev/sdX
# where X is the value for the disk

# in fdisk:
n (ew)
p (rimary)
1
(first and last sector defaults)
w (rite)

sudo fdisk -l
# take note of disk partition, eg: sdX1
sudo mkfs -t ext4 /dev/sdX1

sudo mkdir /mnt/newdisk
lsblk -d -fs /dev/sdX1
# take note of UUID value
# edit /etc/fstab to add the following
UUID=$UUIDValueFromAbove /mnt/newdisk ext4 defaults 0 2

sudo mount -a
# or reboot to test

References:

https://linuxconfig.org/how-fstab-works-introduction-to-the-etc-fstab-file-on-linux

https://linuxconfig.org/how-to-add-new-disk-to-existing-linux-system

write-output using colour

I needed to migrate PS scripts from using write-host to write-output but wanted to keep colour

I found this block of code


function Write-ColorOutput($ForegroundColor)
{
# save the current color
$fc = $host.UI.RawUI.ForegroundColor

# set the new color
$host.UI.RawUI.ForegroundColor = $ForegroundColor

# output
if ($args) {
Write-Output $args
}
else {
$input | Write-Output
}

# restore the original color
$host.UI.RawUI.ForegroundColor = $fc
}

# test
Write-ColorOutput red (ls)
Write-ColorOutput green (ls)
ls | Write-ColorOutput yellow

Get FolderID (FolderStoreID) for all mailboxes

 

# Get-AllMailboxFolderStatistics.ps1
#
# Can be used to pull FolderID for all mailboxes (FolderID is often referenced in the audit logs).
#
# This can take a large time to run depending on number of mailboxes and number of folders (15 minutes is not uncommon)
#
# Outputs to a file called AllMailboxFolderStatistics.csv - this can grow into tens of MB, and in excess of 10000 rows, depending on tenant.
# If the file exists at the start, the script will abort.

$OutputFile="AllMailboxFolderStatistics.csv"
if(-Not (test-path -path $OutputFile))
{
    $Mailboxes=Get-Mailbox
    foreach ($Mailbox in $Mailboxes)
    {
        $stats=get-exomailboxfolderstatistics -userprincipalname $mailbox.userprincipalname
        $stats | export-csv $OutputFile -notype -append
    }
}
else
{
    write-error "$OutputFile already exists - please remove this file before running."
}