Having what seems to be a basic problem in Powershell. I am doing a simple copy-item script from a UNC share to the local C:\\ drive. Here is my code:
C:\\
You could also directly embed the environment variable in double quoted string:
Copy-Item "\\server\share\$env:computername.txt" C:\