Share via

PowerShell issue?

scott gilbert 20 Reputation points
2024-06-06T21:32:28.18+00:00

I am currently studying Powershell and in the book I am using it gives me this command to run........PS Cert:>GCI -Recurse > C:\a.txt; notepad.exe a.txt.....yet when I run this command the file opens up and it is blank. A little help please.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Marcin Policht 92,630 Reputation points MVP Volunteer Moderator
2024-06-06T22:19:47.5633333+00:00

Running

Get-ChildItem -Recurse Cert: | Out-File -FilePath C:\a.txt
notepad C:\a.txt

should list the certificates in the personal certificate store, save the output to a.txt, and open the file in Notepad. If the file is still empty, it may indicate that there are no items in the Cert: drive or that there is an issue with accessing the certificate store.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.