String Expansion in Double-Quotes behaves differently than $ExecutionContext.InvokeCommand.ExpandString - by MyrddinE

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 755270 Comments
Status Resolved Workarounds
Type Bug Repros 9
Opened 7/24/2012 6:56:06 AM
Access Restriction Public


Inside a quoted string, you can execute code inside the $() construct. This does not work when expanding a string using $ExecutionContext.InvokeCommand.ExpandString().

Sign in to post a comment.
Posted by Jason [MSFT] on 11/24/2015 at 1:13 PM
Thanks for the bug report. This was indeed a bug in V3, and I have confirmed the bug is fixed in the latest version of PowerShell V5.
Posted by MyrddinE on 7/24/2012 at 6:57 AM
Powershell v3.0, Windows 7 Professional 64bit on a W2008r2 Domain.