I’m working on an interactive install utilizing the Show-InstallationWelcome function with the -CloseApps parameter. I have several processes that need to be closed, but all start with the same preceding word, for example; App111, AppProc, App482, etc. Is there a way I can use a wildcard in this parameter like App*? I tried this but was unsuccessful. Any suggestions?
Before you run the Show-InstallationWelcome
function you could run Get-Process -Name App*
to get the list of processes and then use those values in your Show-InstallationWelcome
command.
Thanks David, I can give that a try, but I believe I may have it working another way. I put the main process in the -CloseApps parameter, then I put the additional processes in a variable using the Get-RunningProcesses function; Get-RunningProcess -ProcessObjects (Get-Process App*). Almost the same as to what you suggested, but different. However, this is producing the result I’m looking for.