Hi @K. J. Skinner , thank you for responding to my issue, the change did not work, any other suggestions?
I tried your suggestion and changed the first line to:
Get-ChildItem Cert:\LocalMachine -Recurse | Where-Object -not PSIsContainer | ForEach-Object {
And I got a new error:
Where-Object : Parameter cannot be processed because the parameter name 'not' is ambiguous. Possible matches include: -NotLike -NotMatch -NotContains -NotIn.
At line:12 char:58
- Get-ChildItem Cert:\LocalMachine -Recurse | Where-Object -not PSIsCon ...
- ~~~~
- CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
- FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.WhereObjectCommand
I tried this line:
Get-ChildItem Cert:\LocalMachine -Recurse | Where-Object -NotIn PSIsContainer | ForEach-Object {
And got a different error:
Where-Object : The specified operator requires both the -Property and -Value parameters. Provide values for both parameters, and then try the command again.
At line:12 char:45
- ... rt:\LocalMachine -Recurse | Where-Object -NotIn PSIsContainer | ForEa ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [Where-Object], PSArgumentException
- FullyQualifiedErrorId : ValueNotSpecifiedForWhereObject,Microsoft.PowerShell.Commands.WhereObjectCommand