r/PowerShell • • Sep 17 '21

Question Why do Powershell cmdlets change so much?

I've been trying to follow along a month of lunches, and quite a few commands can't be used anymore. How is one supposed to follow along?

Why do they keep changing them?

Won't this mess up people's scripts that they've written before? When are they going to stop changing them.. and why do they change them? Makes me a bit worried.

I want to master Powershell, but if the cmdlets keep changing, wtf?

Thanks.

1 Upvotes

22 comments sorted by

View all comments

0

u/[deleted] Sep 17 '21

[deleted]

2

u/Reddit_Sux_Hardcore Sep 17 '21

Yea I'm always updated the latest Powershell.

0

u/[deleted] Sep 17 '21

[deleted]

-4

u/Reddit_Sux_Hardcore Sep 17 '21

Yea I'm in the latest PS, because I like the latest thing. I can't help it sir.

5

u/chuck_cranston Sep 17 '21

If you're "getting gud" at PowerShell and expecting to use it in an enterprise environment I would suggest getting familiar with the version that is most likely to be installed on all your machines. By default that's going to be 5.1 for windows 10 PC's.

There's a ton of great additions in PS 7 but I'm unable to get it deployed throughout the organization I work at so I write the majority of my stuff in 5.1.

Knowing the Cmdlets isn't as important as know how PowerShell works. Your learning experience is going to be less painful if you use the same version as the book.

1

u/Reddit_Sux_Hardcore Sep 17 '21

Oh, I thought that if you install the latest on your client and server it would be fine, no matter what you run.

So each client needs to have the latest version installed for it to work all over the workplace?

2

u/jimb2 Sep 18 '21

If you are in a corporate environment the default installation of Power shell will be 5.1 on both Windows desktops and servers.

The business is unlikely to upgrade PowerShell on everything without a good reason. It's too much work, testing and remediation. PowerShell is not updated via standard Microsoft updates. Even if it was part of Microsoft updates (and it probably should be) that would update to the latest 5.1.x. A version change to PS7 would break stuff everywhere.

1

u/Reddit_Sux_Hardcore Sep 18 '21

If you are in a corporate environment the default installation of Power shell will be 5.1 on both Windows desktops and servers.

This is true.

The business is unlikely to upgrade PowerShell on everything without a good reason. It's too much work, testing and remediation.

I can install the latest powershell on all client computers at work if I wanted to.

But you're saying I shouldn't?

1

u/jimb2 Sep 18 '21

You can, but you should probably consider that you will be moving away from the common "industry" standard.

We have like 10k+ desktops and several hundred servers at work so consider changes carefully. PS7 has a few nice features but nothing to die for. If we use a third party script it is almost certain to be written to 5.1.

1

u/Reddit_Sux_Hardcore Sep 18 '21

PS7 has a few nice features but nothing to die for.

Yea, my problem is that I thought PS7 was just an update to PS5, and that MS just didn't update the one on their OS.