Using a Variable (PowerShell) inside of a command

Single quoted strings will not expand variables in PowerShell. Try a double quoted string e.g.:

"$computer\admin"

Leave a Comment