File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ class ScriptBuilder {
2020 let command = `Clear-AzContext -Scope Process;
2121 Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue;` ;
2222 if ( scheme === Constants_1 . default . ServicePrincipal ) {
23- command += `Connect-AzAccount -ServicePrincipal -Tenant ${ tenantId } -Credential \
24- (New-Object System.Management.Automation.PSCredential('${ args . servicePrincipalId } ',(ConvertTo-SecureString ${ args . servicePrincipalKey } -AsPlainText -Force))) \
25- -Environment ${ args . environment } | out-null;` ;
23+ command += `Connect-AzAccount -ServicePrincipal -Tenant ' ${ tenantId } ' -Credential \
24+ (New-Object System.Management.Automation.PSCredential('${ args . servicePrincipalId } ',(ConvertTo-SecureString ' ${ args . servicePrincipalKey } ' -AsPlainText -Force))) \
25+ -Environment ' ${ args . environment } ' | out-null;` ;
2626 if ( args . scopeLevel === Constants_1 . default . Subscription ) {
27- command += `Set-AzContext -SubscriptionId ${ args . subscriptionId } -TenantId ${ tenantId } | out-null;` ;
27+ command += `Set-AzContext -SubscriptionId ' ${ args . subscriptionId } ' -TenantId ' ${ tenantId } ' | out-null;` ;
2828 }
2929 }
3030 this . script += `try {
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ export default class ScriptBuilder {
99 let command = `Clear-AzContext -Scope Process;
1010 Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue;` ;
1111 if ( scheme === Constants . ServicePrincipal ) {
12- command += `Connect-AzAccount -ServicePrincipal -Tenant ${ tenantId } -Credential \
13- (New-Object System.Management.Automation.PSCredential('${ args . servicePrincipalId } ',(ConvertTo-SecureString ${ args . servicePrincipalKey } -AsPlainText -Force))) \
14- -Environment ${ args . environment } | out-null;` ;
12+ command += `Connect-AzAccount -ServicePrincipal -Tenant ' ${ tenantId } ' -Credential \
13+ (New-Object System.Management.Automation.PSCredential('${ args . servicePrincipalId } ',(ConvertTo-SecureString ' ${ args . servicePrincipalKey } ' -AsPlainText -Force))) \
14+ -Environment ' ${ args . environment } ' | out-null;` ;
1515 if ( args . scopeLevel === Constants . Subscription ) {
16- command += `Set-AzContext -SubscriptionId ${ args . subscriptionId } -TenantId ${ tenantId } | out-null;` ;
16+ command += `Set-AzContext -SubscriptionId ' ${ args . subscriptionId } ' -TenantId ' ${ tenantId } ' | out-null;` ;
1717 }
1818 }
1919 this . script += `try {
You can’t perform that action at this time.
0 commit comments