I would like to create a powershell alias that open the deskop. But I keep getting error. Do advise.
New-Alias -Name odesk -Value { Start-Process -Path "C:\Users\xxx\xxxx\Desktop" }
New-Alias -Name odesk -Value { Start-Process -Path "C:\Users\xxx\xxxx\Desktop" }
New-Alias : Cannot evaluate parameter 'Value' because its argument is specified as a script block and there is no
input. A script block cannot be evaluated without input.
At line:1 char:30
+ ... desk -Value { Start-Process -Path "C:\Users\xxxx\xxxxx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError:) [New-Alias], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.PowerShell.Commands.NewAliasCommand