Replies: 1 comment
-
DOH! We were putting the script block inside the foreach rather than putting the foreach inside the script block.... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know this isn't the PScribo repo, but your code uses it best IMHO. We are trying to import a CliXML file with nested PsCustomObjects, which works fine with single objects, if we have multiple our normal approach would be a foreach loop. But the PScribo scriptblock doesn't act like everything else we run through the foreach. It will give us the correct number of tables that match how many times it loops, but all of them have the last dataset in them. For example if there are 4 objects, we get four tables but all the values are from the last object 4xs. What are we missing?? Thanks in advance for any help or pointers.
Beta Was this translation helpful? Give feedback.
All reactions