Skip to content

Commit

Permalink
use PascalCase for Variable name "UserAssignedIdentityClientId"
Browse files Browse the repository at this point in the history
  • Loading branch information
diecknet authored Mar 20, 2024
1 parent 8fc5f27 commit a33f690
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SimpleAzureVMStartStop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
.OUTPUTS
String to determine result of the script
.PARAMETER userAssignedIdentityClientId
.PARAMETER UserAssignedIdentityClientId
Specify the Managed Identity Client ID if applicable.
.PARAMETER VMName
Expand All @@ -74,7 +74,7 @@ Specify desired Action, allowed values "Start" or "Stop".
param(
[Parameter(Mandatory = $false, HelpMessage = "Specify the Managed Identity Client ID if applicable.")]
[string]
$userAssignedIdentityClientId,
$UserAssignedIdentityClientId,

[Parameter(Mandatory = $true, HelpMessage = "Specify the VM name or '*' for all VMs in the resource group.")]
[string]
Expand Down Expand Up @@ -107,9 +107,9 @@ $errorCount = 0

# connect to Azure, suppress output
try {
if($userAssignedIdentityClientId) {
Write-Output "Trying to connect to Azure with a User assigned Identity, with the Client ID $userAssignedIdentityClientId..."
$null = Connect-AzAccount -Identity -AccountId $userAssignedIdentityClientId
if($UserAssignedIdentityClientId) {
Write-Output "Trying to connect to Azure with a User assigned Identity, with the Client ID $UserAssignedIdentityClientId..."
$null = Connect-AzAccount -Identity -AccountId $UserAssignedIdentityClientId
}
else {
Write-Output "Trying to connect to Azure with a system assigned Identity..."
Expand Down

0 comments on commit a33f690

Please sign in to comment.