Viser indlæg fra 2019

Compress all BAK files in folder (and subfolders) with 7-Zip and delete original files

Run to fix

Uninstall app with PowerShell

Run this to uninstall app from Windows.

I always put this script in a GPO which runs during Windows logoff, because of a forced reboot during uninstall.

If Hyper-V replica is not normal, or running, send email warning

This script will check health state of Hyper-V replication.

Run this as scheduled task on your server doing Hyper-V replica. If status is not normal, or failing, it will send a SMTP warning email.

Remember to update the first 3 lines with correct information.

Get all user accounts where password never expires using PowerShell

Count and compare two folders with PowerShell and mail the result

Modify script to your needs:

Remove all phone numbers on all users in OU in Windows domain

To remove all phone numbers from all users in Windows domain in a certain OU, run PowerShell script to fix it

Find all Exchange mailboxes a list of users have access to with PowerShell

To find all Exchange mailboxes a list of users have access to put the mailboxes in a TXT file. One mailbox per line, e.g.:


Save the file as 'users.txt' and put the file on your desktop.

Run this code to create a TXT file with all the mailboxes a user has access to: