Why do you think it’s missing? I think you have an extra one that’s not needed. Properly format/indent and it would be easier to see where an extra/missing one is.
I get a “RunspaceID” column that’s not particular useful. Any way to trim that?
Anyway to sort by Domain? As it is, it’s rather random looking…domains’ DCs mixed around each other (yet the first part of the name is not alphabetical either)
How do I capture in a csv, the output sorted on? I thought I would have at least the output (mangled as it was) in the requested csv.
RunspaceID and PSComputerName properties are automatic when running Invoke-Command. There is a -HideComputerName switch which will get rid of the PSComputerName but not one just for RunspaceID. The best way to “select” the properties you want is to pipe the output to Select-Object and put the properties you want to see in the -Property parameter. Or you can use the -excludeProperty parameter for properties you want to exclude.
I believe I’ve done already in the code I posted what you’ve suggested (separately, but you don’t really indicate what order might be tripping up the efficacy of the “sort” I’m looking for, in particular).
Your suggestions (with two separate examples of “Pipe Output to”) are in my code. The help files only account one of those situations (per cmdlet). I’m trying to get both to work together.
And even so, when I try your suggestions by changing up the names of the various Property’s, PS balks that “a positional parameter cannot be found that accepts argument” for all of the property’s I tried (and am I’m only interested in "PCCOmputerName and/or “PerformTicketSignature”
I’ll keep playing with it but thank you for the second set of eyes.
Your comment about “foreach unnecessary…because Invoke-Command will take an array of strings in the ComputerName parameter.” is because this portion of the Help file, correct?