Tag Archives: connection

Publish your Module to PowerShell Gallery with Azure Automation Connection

Recently PowerShell Gallery received a feature that you can deploy Modules from PowerShell Gallery to Azure Automation (part of OMS). You can upload PowerShell Modules to Azure Automation with little or not change to the module. If you want to make your PowerShell module more appealing and easy to use in Azure Automation you can […]

Using VMM Cmdlets locally on SMA Worker Server in SMA Runbooks

If you are working with SMA and VMM you are probably familiar with the following sample Runbook for connecting to VMM:

workflow Get-VM{ $VmmConnection = Get-AutomationConnection -Name ‘VmmConnection’$VmmServerName = $VmmConnection.ComputerName  $SecurePassword = ConvertTo-SecureString -AsPlainText -String $VmmConnection.Password -Force  $VmmCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $VmmConnection.Username, $SecurePassword  $VMMobject=Get-SCVMMServer -ComputerName $VmmServerName -Credential $VmmCredential $VMS=Get-SCVirtualMachine -VMMServer $VmmServerName | select […]