Start-Process with a file name will open the file with it's default open operation according to what is installed and configured. For instance, on my system the program opens into SAS Enterprise Guide.
Consider starting SAS itself and using command line arguments to set system options to do what you want. The are over 120 system options that can be set.
SYSIN
Submit program in batch mode. Creates log file in current folder.
Start-Process SAS -ArgumentList "-sysin ""C:\Temp\myProgram.sas"""
INITSTMT
Submit source code file in interactive mode.
Start-Process SAS -ArgumentList "-initstmt '%include ""C:\Temp\myProgram.sas"";'"
INITSTMT and DM
InitStmt can submit a DM string to execute any of the almost 80 SAS window commands. Careful attention to ridiculous quoting needed to perform this from command line.
FILEOPEN and SUBMIT will open source code file into enhanced editor and submit it.
Start-Process SAS -ArgumentList "-initstmt 'dm editor ""fileopen """"C:\Temp\myProgram.sas"""""";dm ""SUBMIT;"";'"
SASOACT
SASOACT.exe is a helper executable used by SAS context menu items in Windows Explorer. You can submit source code file from the legacy programmer editor window using SASOACT.
Start-Process sasoact.exe -ArgumentList "action=Submit datatype=SASFile filename=""C:\Temp\myProgram.sas"" progid=SAS.Application.940"
The commands can be found in the actions installation script, or in the registry. Submit is located at
HKEY_CLASSES_ROOT\SAS.Program.701\shell\Submit940\command
-FilePathargument, then pass the path to themyprogram.sasfile as the-ArgumentListargument, perhaps?