Removing an Address from the Email address Policy doesn’t remove it from the users.


In Exchange if you delete an address policy or policy entry  it will not remove the address from the users themselves.(this is by design)

This is not an issue if you just modify the address (that will get re-stamped with the modified address)

 

But if you want to remove already stamped addresses from all users in a domain here is the PS command.(2010 and 2007)

    • get-mailbox |% {$a = $_.emailaddresses; $b = $_.emailaddresses; foreach ($e in $a) {if ($e.tostring() -match "DomainIWantToRemove.com") {$b -= $e;}}$_ | set-mailbox -emailaddresses $b}

image

Thanks Michael for the script.

Speed up EMC and Powershell when working on a LAB


  1. Disable CRL Checking (only if you don’t have internet access)
        • Decreasing the amount of time to allow CRL retrieval can significantly improve performance when internet access is poor or non-existent. Setting the value to 200 decimal (milliseconds) may be a reasonable timeout.
    • Name: ChainRevAccumulativeUrlRetrievalTimeoutMilliseconds
      Location: HKLM\SOFTWARE\Microsoft\Cryptography\OID\EncodingType 0\CertDllCreateCertificateChainEngine\Config
      Type: REG_DWORD
        • Decreasing the amount of time to allow all CRL retrievals can significantly improve performance when internet access is poor or non-existent. Setting the value to 500 (milliseconds) may be a reasonable timeout.
    • You can speed up service start by following this KB
  2. Point to a specific CAS when Starting (Keep in mind you could have issues accessing tools if the specific server is unavailable)
    1. EMC
      1. Right click Microsoft Exchange on-Premise
      2. Click Properties
      3. Specify a CAS server
      4. image
    2. Exchange Powershell
      1. Right Click the Exchange Powershell in the start menu
      2. Click Properties
      3. Replace –auto at the end of the shortcut with the FQDN for a CAS server
      4. image image

Verify Outlook Cached\Online Mode


I had a situation recently where a 2003 client was supposed to be in cached mode but behaved as if it were in online mode.

We found that the registry had been modified and set to online mode from the registry and not from GPO or GUI.

Here is where you can check to verify.

HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\ProfileName\13dbb0c8aa05101a9bb000aa002fc45a36601 holds the cached mode settings

  •  
    • dword: 04 00 00 00 disables,
    • dword: 84 01 00 00 enabled Cached Mode

SCVMM Powershell Scripts


I have been working on setting up a shared VMM configuration where I have multiple servers that are shared with multiple developers (they each have their own server but all ties into the same SCVMM.

I copied over VMs, ISO, and Templates to the individual servers but I wanted the resources on each server to be defined as belonging to the developer using it.

But when you copy them they all show as unknown…… now I am lazy and don’t want to go to the properties of each object and set the owner, and powershell being the wonderful thing it is made this easy so here is my “owner script”

You can run as individual 1 liners or save all together as a single .ps1 file

 

*************************************************************

Get-vmmserver localhost

#Set all TEMPLATES on SERVER1 to USER_ONE

Get-Template | ? {$_.LibraryServer -EQ "SERVER1.LAB.LOCAL"} | Set-Template -Owner USER_ONE | FT name, owner

#Set all ISO on SERVER1 to USER_ONE

Get-iso | ? {$_.LibraryServer -EQ "SERVER1.LAB.LOCAL"} | Set-iso -Owner USER_ONE | FT name, owner

#Set VM on SERVER1 to USER_ONE

get-VM | ? {$_.LibraryServer -EQ "SERVER1.LAB.LOCAL"} | Set-VM -Owner USER_ONE | FT name, owner

get-VM | ? {$_.VMHOst -EQ "SERVER1.LAB.LOCAL"} | Set-VM -Owner USER_ONE | FT name, owner

#Set VHD on SERVER1 to USER_ONE

Get-VirtualHardDisk | ? {$_.LibraryServer -EQ "SERVER1.LAB.LOCAL"} | Set-VirtualHardDisk -Owner USER_ONE | FT name, owner

 

****************************************************************