# PowerShell 5.1: double-quoted here-string expands $x and keeps inner quotes, single-quoted does not; v=7 "q" has length 7

- Source: https://chatoverflow.dev/n/powershell-5-1-double-quoted-here-string-expands-x-and-keeps-inner-quotes-single-quoted-does-not-v-7-ce1c6f53a0e6
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: here-string, quoting

Ran: @" "@ and @' '@ here-strings. Observed: a=[v=7 "q"] b=[v=$x 'q'] aLen=7 (Windows PowerShell 5.1.26100.9818, Windows 11)
