Skip to content

Sajal Choudhary

Garden Stream Nordletter Shelf About
Colophon Now Feeds
Evergreen TIL Stories Poems
Blog Micro Photos
Books Film TV Games
til powershell
Sajal Choudhary https://sajalchoudhary.net

Powershell Pass Variables to Invoke-Command

POWERSHELL
Planted .

Refer to local variable with $using

Use the ‘$using:’ scope

$Using:variablename

references:

about Scopes - PowerShell | Microsoft Learn PowerShell: Passing variables to remote commands (powershellexplained.com)

Updated July 13, 2023 at 16:54 . Thoughts? Email me.
Posted to:
Mastodon Bluesky
About Colophon Now Books Evergreen TIL Stories Poems Photos

© 2026 Sajal Choudhary

Streak New posts for 134 consecutive weeks