Share via

Script crshes ISE

Perez, Oscar 21 Reputation points
2020-11-30T21:12:11.897+00:00

Good afternoon,

I downloaded the Get-NetSession.ps1 script from the TechNet Script Center Gallery, but I needed the number of open files, so I substituted SESSION_INFO_10 for SESSION_INFO_1 and defined the two extra fields. It runs and returns the open files, but it crashes ISE right after that.

Does anyone have any ideas why its doing this?

Running on a Windows 10 Enterprise Edition workstation.

Thanks.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Rich Matheisen 48,116 Reputation points
2020-11-30T22:19:16.313+00:00

Considering you're dealing with values returned by a Win32 function, I'd have to guess that your definition of the structure that holds each value is incorrect. Most likely the definition you've used has understated the size of the struct and you've overflowed the stack which holds the information necessary the return to the ISE.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.