Powershell for Smart But Ignorant Users

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Powershell for Smart But Ignorant Users

Post by ChrisGreaves »

I cannot go on asking for help with automating my beloved BATch files and SUBST commands.
So I will grit my teeth, those few that are left, and have a shot at using Powershell in Windows 10.

I have set myself a few objectives in the general area of “Automating the [Re]Boot Process”
(1) Start Notepad
(2) Open a Text File with Notepad
(3) Decrypt an Encrypted Data Partition
(4) Create a Daily “Blotter Folder” as Drive B:
(5) Execute a Dos Batch File

These five types of task are aimed at
(a) Weaning me away from an AutoExec.bat
(b) Making me familiar with basic aspects of Powershell
(c) Making me familiar with basic aspects of Group Policy Editor
(d) Building a simple guide for folks like me

Question: Do these objectives seem reasonable?

There is not much that I do in my auto-boot DOS-CMD sequence apart from these basic skills.

Every man and his dog has Notepad.exe, which is why I chose it as a specific example of “opening an existing file”, and I have a great deal invested in batch files (loading MSWord2003, opening specific VBA application programs, purging temporary files, initiating RoboCopy backups etc.

I reason that once I have some basic benchmarks (I still think of them as job-decks!) in place, I can use those benchmarks to extend my skills and gradually translate my old DOS-CMD batch files into Powershell scripts.
Thanks
Chris
Last edited by ChrisGreaves on 03 Jul 2021, 08:50, edited 1 time in total.
There's nothing heavier than an empty water bottle

JoeP
SilverLounger
Posts: 2066
Joined: 25 Jan 2010, 02:12

Re: Powershell for Smart But Ignorant Users

Post by JoeP »

Those do not seem like anything too difficult but I'm still a PS novice for many things.Powershell Documentation is a good place to start. Also, RetiredGeek in the AskWoody forums is quite good at PowerShell. He can be a valuable resource.
Joe

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Powershell for Smart But Ignorant Users

Post by ChrisGreaves »

JoeP wrote:
03 Jul 2021, 01:06
Those do not seem like anything too difficult but I'm still a PS novice for many things.Powershell Documentation is a good place to start. Also, RetiredGeek in the AskWoody forums is quite good at PowerShell. He can be a valuable resource.
Hi Joe, and thanks for the response.
I had started to wade through that documentation site and will continue to do so.
Yes, I know of RetiredGeek, and do read his posts in general, although I have not communicated with him. I have reposted my query over there.
I have discovered that I am using version 5
Untitled.png
.

Now that I have fixed the Administrator problem, the pressure is off, but I will continue to plod through PS anyway.

Give my love to Elsa.

Cheers
Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

JoeP
SilverLounger
Posts: 2066
Joined: 25 Jan 2010, 02:12

Re: Powershell for Smart But Ignorant Users

Post by JoeP »

PS version 5 is what is shipped with Windows right now. You can download and run PS version 7. It will run side-by-side with version 5. Some things operate differently between the two versions. Version 7 is the future and is supposed to be usable with different non-Microsoft OSes. I would recommend you install version 7.1.3 and learn that.
Joe

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15585
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Powershell for Smart But Ignorant Users

Post by ChrisGreaves »

JoeP wrote:
06 Jul 2021, 16:42
... PS version 7. It will run side-by-side with version 5.
Thanks Joe.
7.1.3 d/l as "PowerShell-7.1.3-win-x64.zip" and installed (it runs without installation, apparently).
I am behind in email and have not yet responded to my thread in AskWoody.
Cheers
Chris
There's nothing heavier than an empty water bottle