I am tracking notes on PowerShell in PS1 files on my git hub repository. You can see all 100 days of code entries on the blog category page.
Today I made it through chapter 5 of the book. And by “made it through” I mean I pretty much re-read the whole while taking notes and issue commands at the same time. Not sure my highlights from however many weeks ago really helped but I’ll say they helped. And it took way too long. I have this week off work. Lets hope by next Saturday I’ll be able to get through a chapter in less than 3 hours (while learning just as much).
I think I now understand providers in PowerShell about as well as I can based on chapter 5. It seems lot like netsh or wmic at the CMD prompt: the prompt itself changes and commands relate directly to the thing that’s running instead of the normal prompt. Providers just provide that sort of…customized prompt I guess you’d call it?…for things like the registry, file system, environment variables and other things. The main reason to have something like that is so a command can be issued to get a piece of information and then it immediately exits.
In other words there’s no reason to go into netsh and stay there, issuing commands. The purpose is really to issue a netsh command, like the name of all the network interfaces, and then immediately exit. So commands can be run against the output. And it’s the same sort of thing with hkcu:, at least that is my extended interpretation even if the book itself didn’t say that outright.