3 ms·
1. You check `$LastExitCode`, similar to `$?`. You can also catch exceptions when dealing with real Powershell commands. 2. Try piping your output through `| F
by gtsteve 4y ago
1. You check `$LastExitCode`, similar to `$?`. You can also catch exceptions when dealing with real Powershell commands.
2. Try piping your output through `| Format-List -Property *`. This isn't very discoverable really.
3. Try selecting the properties you want: `| select Name, ID, Etc`
4. This is the fault of the module developer, not Powershell. You can also write bad software in C.
- psd1 3y ago`$?` works and is more reliable. Git notoriously gives non-zero exit codes for success conditions