他の PowerShell スクリプトから関数を呼び出してオブジェクトを返すにはどうすればよいですか?
メインスクリプト:
# Run function script
. C:\MySystem\Functions.ps1
RunIE
$ie.Navigate("http://www.stackoverflow.com")
# The Object $ie is not existing
関数スクリプト:
function RunIE($ie)
{
$ie = New-Object -ComObject InternetExplorer.Application
}