Opslag

When running a CU on an Exchange hybrid setup the installation failed because services were disabled. This script will make sure every 10 seconds that Exchange services are not disabled during installation.

Access Exchange online with Office 365 multi-factor authentication (MFA/2FA)

I've been having some trouble doing Exchange PowerShell after enabling Office 365 MFA on my account. I did this to gain access from my computer. 1) First save this to a .reg file (e.g. fix.reg ) and run it to allow installing the Exchange Online Remote PowerShell Module on your computer from Internet Explorer: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel] "MyComputer"="Enabled" "LocalIntranet"="Disabled" "Internet"="Enabled" "TrustedSites"="Enabled" "UntrustedSites"="Enabled" 2) Then paste this URL in Internet Explorer to install the module: https://cmdletpswmodule.blob.core.windows.net/exopsmodule/Microsoft.Online.CSE.PSModule.Client.application 3) Now run this command to connect (remember to modify the  UserPrincipalName to match your own username): Connect-EXOP

7zip compress files (all or with specific extension) in folder and subfolder and delete original file

Customize to your needs:

Send email with attached report of computers not reporting WSUS status within the last 30 days (or never)

Customize to your needs.

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.