Skip to content
This repository was archived by the owner on Jun 29, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Misc/MachineSetup/Azure_VM_CustomScript_Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $web_client.DownloadFile($url, $ps1Path)
$SecureAccountPassword = ConvertTo-SecureString $AccountPassword -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential("${env:COMPUTERNAME}\${AccountName}", $SecureAccountPassword)
Enable-PSRemoting -Force
Invoke-Command -FilePath $ps1Path -Credential $credential -ComputerName $env:COMPUTERNAME -ArgumentList $AccountPassword, $IPythonPassword
Invoke-Command -FilePath $ps1Path -Credential $credential -ComputerName $env:COMPUTERNAME -ArgumentList "${AccountPassword}", "${IPythonPassword}"
Disable-PSRemoting -Force
echo "Ending CustomScript process"

Expand Down
4 changes: 2 additions & 2 deletions Misc/MachineSetup/Azure_VM_Setup_Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# permissions and limitations under the License.
#
################################################################################
param([string]$IPythonPassword, [string]$AccountPassword)
param([string]$AccountPassword, [string]$IPythonPassword)
$previous_pwd = $pwd

$sysDrive = (Get-ChildItem env:SYSTEMDRIVE).Value
Expand Down Expand Up @@ -177,7 +177,7 @@ function ScheduleAndStartIPython(){
$Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $SecureAccountPassword
$AccountPassword = $Credentials.GetNetworkCredential().Password
}
Register-ScheduledTask $taskName -Action $action -Trigger $trigger -Settings $settings -User $username -Password $AccountPassword
Register-ScheduledTask $taskName -Action $action -Trigger $trigger -Settings $settings -User "${username}" -Password "${AccountPassword}"
$AccountPassword = $null

# If the user wants to stop the auto restart of IPython run 'Unregister-ScheduledTask Start_IPython_Notebook'
Expand Down