How is the behavior different from & powershell .\other.ps1 and & .\other.ps1 ?
& powershell .\other.ps1
& .\other.ps1
Edit: In particular, how do they differ if there is an error in other.ps1 ?
other.ps1
In the first case, you get another PowerShell process, and the script cannot read the variables defined in the current session:
PS> $foo = 'bar' PS> 'Write-Host $foo'|Set-Content x.ps1 PS> & powershell .\x.ps1 PS> & .\x.ps1 bar
Source: https://habr.com/ru/post/920030/More articles:ExtJS 4 select multiple CheckColumn checkboxes with checkbox header - extjsTwo arrays in a union in C ++ - c ++C ++ - error with inclusion - c ++how to duplicate a pointer to point to the same object - cMinimum and maximum field value in cakephp and mysql - maxhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/920031/eclipse-rcp-all-possibilities-to-define-dependencies&usg=ALkJrhjPXIDl-mJDkC5-QIBj352XpAklswGit Failure Push: refusal to update a verified branch - gitWhat is the purpose of layout.xml? - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/920034/possible-ways-to-workaround-the-lack-of-api-for-siri&usg=ALkJrhj9hNbuII65-PlrVhAXJ0ivdmGfQwDelphi XE2 Datasnap Session Management - Retrieving Session Information After Page Reload - delphiAll Articles