diff --git a/src/powershell-run/main.cs b/src/powershell-run/main.cs index 3ae4e008a..949f9f451 100644 --- a/src/powershell-run/main.cs +++ b/src/powershell-run/main.cs @@ -121,6 +121,11 @@ namespace Microsoft.Samples.PowerShell.Host ++i; } } + + if ( String.IsNullOrEmpty(initialScript) && args.Length > 0 ) + { + initialScript = string.Join(" ", args); + } } // Create the listener and run it