Due to a planned power outage on Friday, 1/14, between 8am-1pm PST, some services may be impacted.
This repository is the home of several scripts that are developed and maintained by Support Engineersfor Microsoft Exchange Server. The scripts are intended for identifying and resolvinga wide range of issues that impact on-premise or hybrid deployments and migrations. For more information,see the documentation for individual scripts.
This project welcomes contributions and suggestions. Most contributions require you to agree to aContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant usthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to providea CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructionsprovided by the bot. You will only need to do this once across all repos using our CLA.
It is recommended to use Visual Studio Code when developing scripts for this project. Opening VSCode atthe root of this repo will ensure that VSCode uses the settings in the repro to enforce most of theformatting rules.
Before committing, .build\CodeFormatter.ps1 should be run. This script will apply PSScriptAnalyzerformatting rules, and will show any required changes in the form of a diff output. It's a good idea toset the following setting to avoid erroneous ^M characters in the diff output:
git config core.whitespace cr-at-eol
This repo uses a unique and fairly simple build system to create a single release script from a multi-filescript project. You can check the output of this system by running the
.build\Build.ps1 script andchecking the
dist folder. This system provides two ways to combine files into a single .ps1.
Dot-sourcing a script inside another script embeds the target script into the source script. For example,placing the following line inside of Script1.ps1 causes Script2.ps1 to be embedded at that point in Script1.Script2 is then excluded from release:
You can embed any number of scripts. These could be in the same folder or in a child folder. See the
SourceSideValidation.ps1 script in this repo for an example of this.
Because dot-sourcing works normally at development time, the multi-file script can be run and debuggedwithout building at dev time.
Non-script files can be embedded in a script as well. This is accomplished with the following syntax:
$someVarName = Get-Content .\someresource.txt -AsByteStream -Raw
This command populates $someVarName with the binary content of the target file. You can then use thatdata however you like, such as converting it to text or processing it some other way. See the
ExTRA.ps1script in this repo, which embeds a .txt and .html file in this way.
Again, things work normally at dev time and can be debugged without building. However, note that-AsByteStream is only available in PowerShell Core, so PowerShell Core must be used at dev time forthis type of script. The PowerShell Core requirement goes away in the release version since the fileis then embedded in the script.
git clone microsoft-CSS-Exchange_-_2021-03-10_05-50-27.bundle