Posts

Showing posts from 2020

OWA and ECP failure after Install Exchange 2016 CU17

Image
I recently ran into an issue after update Exchange 2016 from CU15 to CU17. The upgrade installation took around an hour, but was eventually completed successfully according to the Installation Wizard at least. When I tried to access ECP, I got the error below even before the login page shows up. At the meantime, Exchange Management Shell is inaccessible due to the error. In the eventlog, there are lots of 1003 errors relate to MSExchange Front End HTTP Proxy.  After some research, it appears the issue is caused by corrupted SharedWebConfig.config files in C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy and C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess. But regenerating the files base on this MS document didn't fix the issue. I end up had to setup a test Exchange 2016 CU17 in my own lab environment. Once the new Exchange is up, I copied those 2 SharedWebConfig.config files to the production Exchange server and then did a IISRESET. To my dismay, ECP t

Package and deploy a PowerShell Lambda function with custom modules

Recently I had the need to create a Lambda function with PowerShell 7. The function is to synchronize data between two REST APIs. It's fairly simple, but does need to use a custom made module. I spent quite bit time to find out how to deploy PowerShell Lambdas with custom modules. Thought might write a guide to help people want to do the same.    My script is fairly simple, it get a list of users from one API and then convert it to a XML format object and export into the target API. To reuse some of the code, The script requires AWS.Tools module as well as a custom made module, let's called it CAT. The CAT is module contians some functions that are invoked in by the main script. The inital lines of my main script looks like below: #Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.0.5.0'} #Requires -Modules @{ModuleName='AWS.Tools.SecretsManager';ModuleVersion='4.0.5.0'} #Requires -Modules CAT  In addition to install the AWS.Tool

Test out PowerShell 7 new features in WSL

Image
Finally, PowerShell 7 is now GA! As a heavy WSL user, I was keen to see how some of its new features will work in WSL1 (Ubuntu 4.4.0-18362-Microsoft). Below are the tests I have done. Installation in WSL Download the binary from Github repo to a local folder /usr/share/powershell sudo wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.0/powershell-7.0.0-linux-x64.tar.gz Untar the file sudo tar xzvf powershell-7.0.0-linux-x64.tar.gz Add path for your shell export PATH=/usr/share/PowerShell:$PATH Reload .bashrc source .bashrc Remove the tar ball sudo rm /usr/share/PowerShell/powershell-7.0.0-linux-x64.tar.gz Run PowerShell 7 by run pwsh Import Windows Modules in WSL Install commonly Vendor released modules like VMware PowerCli Install-Module -Name VMware.PowerCli Install .Net based modules also works fine. Install-Package PrtgApi What about those module require Windows GUI, like Out-GridView? PowerShell 7 on Windows fully support this