0

enter image description hereI'm newbie learning powershell, i'm trying to declare the variable but when i integrate that variable with invoke-command , it is fail. Could you please correct me where i got wrong? Thank you so much

I'm expected who can correct me with variable in powershell

  • 1
    2 things. When you're querying a remote machine, you have to pass locally scoped variables with `$using:`, or via the `-ArgumentList` parameter. You'd also be passing it an entire process object. Just pass it the name. – Abraham Zinala Nov 25 '22 at 17:37
  • Please (also) post your code, data, error messages as ([properly formatted](https://stackoverflow.com/help/formatting)) _text_, [not (just) as _images_](https://meta.stackoverflow.com/a/285557/45375). – mklement0 Nov 25 '22 at 18:18

0 Answers0