Skip to content

Commit 3914a72

Browse files
authored
Merge pull request #6275 from SudhakaraReddyEvuri/suredd-fix-space-in-location
Remove spaces in location before comparision
2 parents a00d943 + c8a03ef commit 3914a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/Scripts/AzureDiskEncryptionPreRequisiteSetup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ $ErrorActionPreference = "Stop"
230230

231231
foreach($vm in $allVMs)
232232
{
233-
if($vm.Location.ToLower() -ne $keyVault.Location.ToLower())
233+
if($vm.Location.replace(' ','').ToLower() -ne $keyVault.Location.replace(' ','').ToLower())
234234
{
235235
Write-Error "To enable AzureDiskEncryption, VM and KeyVault must belong to same subscription and same region. vm Location: $($vm.Location.ToLower()) , keyVault Location: $($keyVault.Location.ToLower())";
236236
return;

0 commit comments

Comments
 (0)