List all SMTP Addresses for all Mailboxes or Distribution Groups in Exchange

This PowerShell script allows you to export from Exchange, a list of addresses and all associated alias'/SMTP Addresses. This works for both mailboxes and for distribution groups.

 

$Mailboxes = Get-Mailbox -ResultSize Unlimited
ForEach ($Mailbox In $Mailboxes) {
  $DisplayName = """" + $Mailbox.DisplayName + """"
  $EMailAddresses = $Mailbox.EMailAddresses
  $EMailString = """"
  ForEach ($EMailAddress In $EMailAddresses) {
    If ($EMailString -eq """") {
      $EMailString += $EMailAddress.ProxyAddressString
    } Else {
      $EMailString += "," + $EMailAddress.ProxyAddressString
    }
    $EMailString
  }
  $EMailString = $EMailString + """"
  $DisplayName + "," + $EMailString | Out-File -FilePath "Report.csv" -Append

Upgrade Server 2016 Standard to Server 2016 Datacenter

If you need to change the edition of Server 2016 you can use the following command.

DISM /online /Set-Edition:<edition> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula

To check what editions you can change to use:

DISM /online /Get-TargetEditions

Here are the standard product keys for each edition.

Windows Server 2016 Datacenter CB7KF-BWN84-R7R2Y-793K2-8XDDG
Windows Server 2016 Standard WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY
Windows Server 2016 Essentials JCKRF-N37P4-C2D82-9YXRT-4M63B
Windows Server 2019 Standard N69G4-B89J2-4G8F4-WWYCC-J464C
Windows Server 2019 Datacenter WMDGN-G9PQG-XVVXX-R3X43-63DFG

Upgrade to Windows 10 Professional installs Enterprise

  1. Open the Settings app and click Update & Security.
  2. Open Activation and click Change product key.
  3. Enter your Windows 10 Professional product key and click Next.
  4. Restart the computer after the new product key is activated.

You can force a downgrade with the default product key (VK7JG-NPHTM-C97JM-9MPGT-3V66T) of Windows 10 Professional.

Windows Deployment Server DHCP Options

Windows Deployment Server normally just works after installation, but if for some reason you need to set these values manually in DHCP, here are the DHCP Options that you need for a standard UEFI boot. 

Set the 066 Boot Server Host Name to your Windows Deployment Server IP address.

Set the 067 Bootfile name to boot\x64\wdsmgf.efi

 

Get Disk Space using PowerShell

Run the following script:

Get-WmiObject -Class Win32_logicaldisk -Filter "DriveType = '3'" | Select-Object -Property DeviceID, DriveType, VolumeName, @{L='FreeSpaceGB';E={"{0:N2}" -f ($_.FreeSpace /1GB)}}, @{L="Capacity";E={"{0:N2}" -f ($_.Size/1GB)}}