Block Microsoft Telemetry using NULL routes

Microsoft has hard coded the addresses to their telemetry servers. The known servers are:

We cannot block there via the “hosts” file due to the sites being hard coded.
But we can block them using NULL routes.

First, open an “administrative” command prompt.
Then run the following command.

route print

This will give us our current routing information. We want the first “Gateway” address listed in the “IPv4 Route Table”.
Substitute your own “Gateway” address for “” in the two commands below.

route add mask if 1 -p
route add mask if 1 -p

Now try to ping the hosts, and you will see they are now unreachable.

Quick System Info – Powershell

Here is a PowerShell script to get basic system inventory information about your computers and parse it into CSV format.
Tested on Dell,HP, and Lenovo systems.

$MyArray = $null
$MyArray = @()
$ComputerList = Get-Content "C:\Scripts\Computers.txt"
ForEach ($Computer in $ComputerList){
COMP = $Computer
$MyObj = "" | Select "Computer","Manufacturer","Model","ServiceTag","Memory","HDSerial","User"
$MyObj.Computer = $COMP
$MyObj.Manufacturer = Get-WmiObject Win32_BIOS -Computer $COMP |Select -ExpandProperty Manufacturer
$MyObj.Model = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty Model
$MyObj.ServiceTag = Get-WmiObject Win32_BIOS -Computer $COMP |Select -ExpandProperty SerialNumber
$MyObj.Memory = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty TotalPhysicalMemory
$MyObj.HDSerial = Get-WmiObject Win32_PhysicalMedia -Computer $COMP |Where-Object {$_.tag -like "*PHYSICALDRIVE0*"} |select -ExpandProperty SerialNumber
$MyObj.User = Get-WmiObject Win32_ComputerSystem -Computer $COMP |Select -ExpandProperty UserName
$MyArray += $MyObj
$MyObj = $null
$MyArray |export-csv "C:\Scripts\ComputerReport.csv"

Removable EXTx drive for non-root Linux user

Today, we will cover setting up an external removable drive using the EXT3 file system, and to allow us to mount the drive as a normal (non-root) user. This allows us to keep existing Linux file permissions when we write to the drive, and features journaling which ensures that what we write to the removable drive, is completely written to disk.

This system also allows us to easily create separate mount points for distinct removable drives, which facilitates the use of multiple drives in a scripted backup strategy.

So let’s get started!

First thing we do is determine how the drive is recognized by the kernel:

From the command prompt:

sudo tail -f /var/log/messages
su -c tail -f /var/log/messages

and look for something on the order of “[sdb] Attached SCSI disk” after we plug in our removeable device.

The kernel output will tell us if there are any existing partitions (look for “sdb1″, “sdc1″ etc.)

Ctrl-C to exit tail

Next we need to create a partition table, if there are existing partitions you’ll need to ensure thay do not contain important data before you remove or overwrite them.

Again from the command prompt:

sudo fdisk /dev/sdb
su -c fdisk /dev/sdb

Choose “n” for “new partition”

Then “p” for “primary partition”

Then “1” for the first partition.

Then the defaults for the sectors.

Then “w” to write changes and quit.

Our next step is to create a filesystem

Again from the command prompt:

sudo mkfs.ext3 /dev/sdb1
su -c mkfs.ext3 /dev/sdb1

This might take a while depending on the drive size

While we wait, open another terminal window and continue working.

We are going to name our disk “BU_Linux” but feel free to change the name, but avoid spaces and wildcard/reserved characters in the name (No: “.”, “\”, “?”, “!”, etc.). We will mount the disk using the same name under the “/media” directory.

Again from the command prompt:

sudo mkdir -p /media/BU_Linux
su -c mkdir -p /media/BU_Linux

Next we need to backup “/etc/fstab”

sudo cp /etc/fstab /etc/
su -c cp /etc/fstab /etc/

Then we can edit “etc/fstab” using vi:

sudo vi /etc/fstab
su -c /etc/fstab

and add a line as below:

"LABEL=BU_Linux  /media/BU_Linux  ext3  defaults,user,noauto  0 0"

We then will go back to our prior console window, hopefully mkfs.ext3 has finished.

We now create the disk label using “e2label” which can display or change the filesystem label on the ext2, ext3, or ext4 filesystems.

Again from the command prompt:

sudo e2label /dev/sdb1 BU_Linux
su -c e2label /dev/sdb1 BU_Linux

Now let’s mount the drive!

Again from the command prompt:

mount -L BU_Linux

Let’s check if the drive is mounted.

Again from the command prompt:

mount |grep BU_Linux

Which should return:

“/dev/sdb1 on /media/BU_Linux type ext3 (rw,noexec,nosuid,nodev,user=MyUserName)”

Now let’s examine the drive.

Again from the command prompt:

df -h /media/BU_Linux

Which tells us how much free space is available


ls -al /media/BU_Linux

which should show us the “lost+found” directory

Now if we try to write a file ie.:

echo "This is a test" > /media/BU_Linux/test.txt

You’ll see that you cannot write to the disk.

So let’s fix this!

Again from the command prompt:

sudo chmod 777 /media/BU_Linux
su -c chmod 777 /media/BU_Linux

And try again!

echo "This is a new test" > /media/BU_Linux/new_test.txt

And we should have success.

This change will survive remounts because the permission you just changed is resident on the volume’s filesystem.

When you are finished you’ll need to unmount the file system before removing the drive.

Again from the command prompt:

umount /dev/sdb1