New to PS, probably will irritate long-time users, the pop-up help is really annoying…
Anyway, got this code from the Microsoft website “https://devblogs.microsoft.com/”, I’m trying to figure out how to redirect the output of a PS script to a file. I’m just copying it and changing the directory for the output file but it produces an error.
Get-Process -Name pwsh | Out-File -Path C:\PS_Power-Shell\OutPut_to_File\OutPut_to.txt
Out-File : A parameter cannot be found that matches parameter name ‘Path’.
At line:1 char:35
- Get-Process -Name pwsh | Out-File -Path C:\PS_Power-Shell\OutPut_to_F …
- CategoryInfo : InvalidArgument: ( [Out-File], ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.OutFileCommand
Could you point for any good resource for learning the PS, I’m not going to be a programmer, just need to know my way around to write some small scripts.
Any help is appreciated.