Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Trying to use a waitforexit Powershell Script

I have a step in a deployment that checks to see when something ends and then send a file to a folder with the machine name.  i have been able to do this when checking for other processes, but when i use a wildcard for the process name it fails. The problem is the process name is not consistent, it usually begins with a number string followed by .ftwlaunch.exe.  below is the script and the failure output, can someone please tell me what is wrong.

$a = get-process *.ftwlaunch.exe

$a.waitforexit()

Write-Output "DONE" | Out-File "\\wlsrvr-fs1\users\fidessa\finished\$env:computername.txt"

 

 

Exception setting "BufferSize": "Cannot set the buffer size because the size specified is too large or too small.
Parameter name: value
Actual value was 250,300."
At C:\WINDOWS\AdminArsenal\PDQDeployRunner\service-1\exec\Error Handling Wrapper.ps1:7 char:5
+ $rawUI.BufferSize = $newSize
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExceptionWhenSetting

 

0

Comments

5 comments
Date Votes
  • Huh, that's weird. Try this:

    $a = Get-Process | Where-Object { $_.ProcessName -like "*.ftwlaunch.exe" }
    0
  • Nope still get the same error.

    0
  • Which version of Deploy are you using?

    0
  • 12.1.0.0 Pro Mode

     

    0
  • Were you able to find a solution to this issue?

    0