View Get-MailboxFolderStatistics.ps1
Get-MailboxFolderStatistics test@test.com | Select-Object name, @{
Name="FolderSize";
Expression={
[math]::Round(([regex]::matches($_.FolderSize,'\(([^\}]+)\)').value -replace 'bytes', '' -replace '\(', '' -replace '\)', '' -replace ',', '') / 1MB, 2)
}
} | Sort-Object FolderSize -Descending
View vmExtension.azuredeploy.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"metadata": {
"description": "Name of the VM"
}
}
View Get-VMIdFromJobId.ps1
workflow Get-VMIdFromJobId {
param(
    [Parameter(Mandatory=$true)]
    [STRING]$VMMJobId    
    )
    #Get VMM Connection Object
    $vmmcon = Get-AutomationConnection -Name "SCVMM"
    #Construct the VMM Credential