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
Comments
Huh, that's weird. Try this:
$a = Get-Process | Where-Object { $_.ProcessName -like "*.ftwlaunch.exe" }Nope still get the same error.
Which version of Deploy are you using?
12.1.0.0 Pro Mode
Were you able to find a solution to this issue?