Copy current location to clipboard
Update your code to just return the Path
:
(pwd).Path | CLIP
If you're using PowerShell v5 or newer you can use Set-Clipboard instead of clip(.exe).
(pwd).Path | Set-Clipboard
In PowerShell 5.0 and above, you can also use
(pwd).Path | scb
or
scb (pwd).Path
where scb is an alias for Set-Clipboard
Documentation available at https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-clipboard?view=powershell-5.1