Skip to content

Commit b088b9d

Browse files
Update profile.ps1 template (#6611)
Update profile.ps1 template to set Disable-AzContextAutosave scope to process instead of current user.
1 parent 153aa70 commit b088b9d

File tree

2 files changed

+2
-2
lines changed
  • src/WebJobs.Script/FileProvisioning/PowerShell
  • test/WebJobs.Script.Tests/Resources/FileProvisioning/PowerShell

2 files changed

+2
-2
lines changed

src/WebJobs.Script/FileProvisioning/PowerShell/profile.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Authenticate with Azure PowerShell using MSI.
1313
# Remove this if you are not planning on using MSI or Azure PowerShell.
1414
if ($env:MSI_SECRET) {
15-
Disable-AzContextAutosave
15+
Disable-AzContextAutosave -Scope Process | Out-Null
1616
Connect-AzAccount -Identity
1717
}
1818

test/WebJobs.Script.Tests/Resources/FileProvisioning/PowerShell/profile.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Authenticate with Azure PowerShell using MSI.
1313
# Remove this if you are not planning on using MSI or Azure PowerShell.
1414
if ($env:MSI_SECRET) {
15-
Disable-AzContextAutosave
15+
Disable-AzContextAutosave -Scope Process | Out-Null
1616
Connect-AzAccount -Identity
1717
}
1818

0 commit comments

Comments
 (0)