Skip to content

Sajal Choudhary

Garden Stream Nordletter Shelf About
Colophon Now Feeds
Evergreen TIL Story Poem Haiku
Blog Micro Photo
Book Film TV Game
til powershell
Sajal Choudhary https://sajalchoudhary.net

Powershell Pass Variables to Invoke-Command

POWERSHELL
Planted . Last tended .

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 August 25, 2026 at 14:30 . Thoughts? Email me.
Posted to:
Mastodon Bluesky
About Colophon Now Books Evergreen TIL Story Poem Haiku Photo

© 2012–2026 Sajal Choudhary

Streak New posts for 140 consecutive weeks