#!/bin/pwsh . "$PSScriptRoot/../../Scripts/Context.ps1"; function Get-AutoLoginScript() { return { param( [string]$ContextScriptPath, [string]$PreparedUsernameProperty, [string]$PreparedSecretProperty ); . "$ContextScriptPath"; $context = [Context]::new(); $userName = $context.Get($PreparedUsernameProperty); $password = $context.Get($PreparedSecretProperty); $context.SetAutologin($userName, $password); }; }