VMware ESXi Host Configuration Backup Script with PowerCLI

Keeping a copy of ESXi host configurations is a practical safeguard before maintenance, upgrades, or hardware changes. A PowerShell script based on VMware PowerCLI can automate this task by connecting to each host, exporting the firmware configuration, and storing the backup in a structured folder layout. The script described here is self-contained. All settings are … Weiterlesen

Powershell S/MIME Certificat Exporter

I needed a script to export S/MIME encryption certificates for a client migration. The script requires that the S/MIME private key be exportable. If it isn’t, the certificate can only be recovered at the CA using a Key Recovery Agent (if configured) or Mimikaz 😉 The search routine for the correct certificate may also need … Weiterlesen

Check Exchange schema version

When installing a cumulative update for Exchange Server, it’s often unclear whether a schema update is necessary. Microsoft usually specifies the required schema version. To check if I’m already using the correct version, I wrote a PowerShell script that outputs the Exchange schema version: You can find a good table view of a collection of … Weiterlesen

Check and re-balance Exchange DAG

It you did some maintenance in your Exchange DAG you must move mailbox databses to other server. After exit the maintenance you should check if some databases are running active on the „wrong“ server. You can also wait until the PreferenceMoveFrequency is over and the cluster do this by itself. You can check the PreferenceMoveFrequency … Weiterlesen

Get all Exchange system mailboxes

When I migrate an Exchange Server and move all the mailboxes, I regularly „forget“ to move the system mailboxes, and then I get an error when deleting the mailbox database. Here are all the commands to find the relevant mailboxes and migrate them if necessary. IMPORTANT: This must be done for each mailbox database because … Weiterlesen

Set NTFS Permissions via Powershell

During a file server migration, one of the more time-consuming tasks was rebuilding NTFS permissions on a folder structure. Doing this manually in the GUI would have worked, but it would also have been slow, repetitive, and easy to misconfigure. PowerShell turned out to be the better option because it allows the permission model to … Weiterlesen

Update DNS Server Settings for DHCP Reservations with PowerShell

When a DNS service is moved to a new server, updating all related DHCP reservations manually can quickly become tedious. PowerShell is a much better option because the DHCP cmdlet Set-DhcpServerv4OptionValue can change option 6, which is the DNS server setting, for reserved IPv4 addresses directly. In this case, the goal was to update the DNS server … Weiterlesen