I am looking at a script on technet that I am going to modify to suit my needs, I have a question regarding how to shorten this please:
$temp = get-ChildItem "env:\TEMP" $temp2 = $temp.Value Remove-Item -Recurse "$temp2\*" -Force -Verbose
I do not want to have to use the second variable ‘$temp2’ - can I somehow get the third line to parse the command:
Remove-Item -Recurse "$temp.value\*"
Thanks very much