Hi Goran,
Thank you so much for sharing. I am able to start the VM using script. But I am unable start the HANA DB using the script. We are getting below error message.
Get-AzDBMSStatus : Cannot bind argument to parameter 'HANAInstanceNumber' because it is an empty string. At line:94 char:1 + Get-AzDBMSStatus -SAPSIDDBMSVMs $SAPSIDDBMSVMs -PrintExecutionCommand ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-AzDBMSStatus
Start-AzDBMS : Cannot validate argument on parameter 'SAPHANAInstanceNumber'. The character length (0) of the argument is too short. Specify an argument with a length that is greater than or equal to "1", and then try the command again. At line:98 char:1 + Start-AzDBMS -SAPSIDDBMSVMs $SAPSIDDBMSVMs -PrintExecutionCommand $Pr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Start-AzDBMS