I am calling a cmdlet from an imported library. The cmdlet is recognized and runs as expected from the PowerShell ISE. This cmdlet splits a large text file into multiple text files. Specifically this is the Split-NAVApplicationObject command (https://msdn.microsoft.com/en-us/library/dn789718(v=nav.80).aspx)
When I call this command from a custom C# application (using PowerShell and Runspace classes) with the same arguments it runs, but does not produce and output files. I know that it is executing because it's a really large file and it take a while to finish. I don't get anything in the streams coming from PowerShell (only warnings and progress, no errors).
I have also tried creating a file with the New-Object cmdlet, and that works. So it's not some sort of permissions issue on the folder. I've confirmed I'm running as admin. I also tried piping the output of the command to a file in the folder where the other files should appear and that works (no data in the file even though I used -WhatIf).
Anyone have an idea of what I could do to figure this out?