r/PowerShell • u/CarrotBusiness2380 • 9d ago
News Powershell 7 is coming to Windows
https://devblogs.microsoft.com/powershell/powershell-7-coming-to-windows/317
u/Taftimus 9d ago
Where else would it come
134
12
u/Cutoffjeanshortz37 9d ago
Well, it is trying to become cross platform, but this title is /r/TitleGore
6
2
1
1
u/Schmatter_Raphiqui 7d ago
is it actually preinstalled out of the box now instead of needing a separate installer
38
u/Jeriath27 9d ago edited 9d ago
Now, can they PLEASE update their fucking server system modules to actually work in PS7 properly. I was ready to move to PS7 with my new 2022 servers at work but I can't because exchange cmdlets STILL don't work with it
39
u/BlackV 9d ago
ow, can they PLEASE update their fucking server system* modules to actually work in PS7 properly.
Magic 8-ball says:
Outlook not good
10
4
u/0f_rice_and_men 9d ago
I think long term, they are going to abandon anything local.
We will all jam our dicks into a PIV laptop reader for signing into our Copilot VDI where you can lease an Azure terminal session when you need to customize anything. USB and traditional disks will look like ancient artifacts to anyone born after 2020
2
u/ITGuyThrow07 9d ago
Seriously. They have a snap-in for managing Exchange after removing Exchange servers. You can't load snap-ins in PS7.
30
u/C0rn3j 9d ago
Can't wait for my installations to come with 5 versions of powershell in a couple years, none of which are the up to date powershell.
Microsoft should really learn to deprecate things and just kill them off after a certain date on a build upgrade.
14
u/cloudAhead 9d ago
Microsoft's secret sauce is that they avoid breaking changes as much as possible. Windows still ships with the VB6 runtime, even though VB6 reached EOL almost 20 years ago.
9
u/C0rn3j 9d ago
Microsoft's secret sauce is that they avoid breaking changes as much as possible.
I am aware, it's a horrible approach, and it's why they still have bugs in latest W11 that were introduced literal decades earlier.
I am so glad that I cannot create a directory named COM in W11 because someone needed to use that quirk in DOS back in the 90s, or that an application can die and the tray won't be cleaned up until you hover over it, because what if someone relied on that behavior back in 2001 on Windows XP...
Want your AUX/COM/etc ancient behavior? Spin up a container/VM with an ancient Windows release, and let me have a working system.
4
u/ChiefWetBlanket 9d ago
That's not even a DOS thing. The restricted names for folders comes from CP/M. And it makes sense if you understand how OSes handle that specific name internally.
2
u/C0rn3j 9d ago
The restricted names for folders comes from CP/M
So something that died almost 20 years earlier than DOS, great, it's there because someone last used it in 1983.
it makes sense if you understand how OSes handle that specific name internally
Of course, it makes perfect sense, if we're in the early 80s.
What's the reason the limitation needs to be there in modern systems? Inertia.
5
u/ChiefWetBlanket 9d ago
You don't understand it, and it shows.
How do you think Windows does to make a call to a COM port?
1
1
u/jbmartin6 3d ago
I am curious about your need to have a folder named COM. I just made a folder with that name on my windows 11pc with no issues. Through explorer and Powershell, both worked
1
u/C0rn3j 3d ago
It's actually CON, not COM.
1
u/jbmartin6 3d ago
Ah I see, I stand corrected. This still works fine in Explorer but runs in to trouble on the command line
1
u/C0rn3j 3d ago
W11 26H2, does not work fine in Explorer.
1
u/jbmartin6 3d ago
Interesting I am on 25H2, maybe they added it back in 26
1
u/jbmartin6 3d ago
No you are right. I can create it in Powershell and use it in Explorer, but I can't create it in Explorer or use it in powershell
2
1
u/redbirdrising 7d ago
Yeah, probably because office still uses VBA. Which actually makes me kind of invaluable because I initially was taught VB6.
171
u/pt5 9d ago
âŠhuh?! Iâve been using PS7 on Windows for YEARS.
112
u/db_newer 9d ago
They mean built-in with Windows
21
u/pt5 9d ago
So replacing PS5 or just shipping in addition to it by default?
14
u/sarge21 9d ago
Click and read the article
89
u/felix1429 9d ago
How dare you suggest such a thing
26
u/kennyj2011 9d ago
So RTFM? Lol
12
u/felix1429 9d ago
I mean it's a blog post, but sure
8
u/RyeonToast 9d ago
That's practically a manual these days. I find most of my good Windows info on forum and blog posts. Now I'm an old man shaking my fist at the clouds because the modern platforms want to make you log in to view posts. How am I gonna look up these errors! <FistShaking />
2
u/SkynetUser1 9d ago
Bold of you to expect that I can read! I'm dictating this to my cat right now.
Also, bring treats over. Me, the human, demands cat treats!
15
u/RandomSkratch 9d ago edited 9d ago
Theyâre integrating Windows PowerShell 5.1 (that comes built-in) with PS7. Itâll have a SxS mode for those things that donât work in 7.
I misunderstood the article (the KB linked in it has better details). 7 will just be included by default with 5.1 moving to FOD. Thanks to u/BlackV for the correction below.9
u/BlackV 9d ago
Theyâre integrating Windows PowerShell 5.1 (that comes built-in) with PS7.
they're not, they are just pre-installing powershell 7 and moving 5.1 to FOD
it'll use the same compatibility mode its always used for vesion 5 modules
3
19
10
u/ITGuyThrow07 9d ago
Windows PowerShell 5.1 is deprecated. It's no longer in active development.
They should really let Microsoft know. There are still PS modules they publish that don't work on PS7. Their commands for managing Exchange after removing removing Exchange servers is still a snap-in requiring 5.1.
7
u/Artwertable 9d ago
Just checked the removed commands in Core and there some that are for me really important.
Add-ComputerEnable-ComputerRestoreGet-EventLogReset-ComputerMachinePasswordStart-TransactionTest-ComputerSecureChanneletc...
I really hope we get a replacement for that or an alias like for such command. That would break the most random stuff in my environment. I use PowerShell 7.x but not our Endpoints.
9
u/Ok_SysAdmin 9d ago
That's some pretty important commands, there better be replacements
3
u/Raskuja46 7d ago
You know there won't be. They'll bungle this like they've been bungling everything else for the last several years.
1
u/cloudAhead 9d ago
Get-WinEvent instead of Get-EventLog, no? I know it's unfashionable, but net.exe,netdom.exe still does the job on adding computers, resetting passwords, secure channel testing.
4
u/sneesnoosnake 9d ago
Yes let's go back to batch files. Which is essentially what I am doing writing "& some command.exe..."
6
u/oubeav 9d ago
Finally. PS7 is great......for Windows.
6
u/SupremeDictatorPaul 9d ago
I mean, itâs pretty great on Linux too, itâs just that since itâs uncommon, no guides or anything are built to use it. PWSHâs ability to use objects on the command line is just plain superior to bash text pipelines. Of course, with using AI to actually create and run command lines becoming more common, itâs becoming a bit of a moo point. Soon it wonât matter what the shell is, as long as it provides access to the needed functionality.
-1
u/deafphate 9d ago
Powershell is a great, but essentially is worthless on Linux since it doesn't have access to the legacy dotnet libraries. Was very excited when it was announced and very disappointed.Â
6
u/wonkifier 9d ago
Powershell is a great, but essentially is worthless on Linux
Weird, considering I use pwsh on Linux as my primary tool for managing things in the $ multi-billion company I work for.
So worthless that people keep coming to me to model interactions until we understand them, so they can go implement things in their "proper" systems... and then I'm called on for future troubleshooting since their "proper" systems don't have the flexibility to dig around when the real world doesn't match documentation.
Heck, we've saved millions over the years just on companies we haven't had to contract with to handle merger and divestiture data handling for internal systems, because pwsh was flexible enough to explore the data for eventual planning, and often to be the data transformation mechanism.
Could we do that all with other languages/platforms? Sure. But not nearly as easily. (:shudders at the memories of piles of temp files being processed by batch commands:)
5
u/ankokudaishogun 9d ago
so far I still find it incredibly useful for JSON, CSV, file manipulation, and, unexpectedly, process identification(which, to be fair, has been useful mostly for wine shenanigans)
2
u/dathar 9d ago
I end up using pwsh on Linux to interact with APIs because it is a bit easier for me than Python. Place I work at primarily uses SaaS and Microsoft has Graph REST endpoints everywhere so I just hit that up directly. I have my native JSON tools and working with objects already there. Only recent bummer was that they broke -followrellink a little while ago.
31
u/mamalukes 9d ago
What about ise?
51
11
32
u/ribsboi 9d ago
Man I love ISE. I just can't get myself to use VSCode or something else. It just works and it's on every Windows device
37
u/Leviticus_Sux 9d ago
I was the same as you for a while, but I'm telling you. It's just comfort. Give it two weeks. Accept you will be slower and uncomfortable for those two weeks. But it will totally be worth it in the long run.
7
u/ZZartin 9d ago edited 9d ago
But it's the available in every windows device thing. I like having a native scripting language with no extra installs that had an IDE.
5
u/in_use_user_name 9d ago
Exactly. I manage thousands of windows VMs. Sometimes I need to edit something small or have a little bit more control when running a script. I won't install vscode on each machine.
2
2
u/ghost_broccoli 9d ago
i like ise for small edits on the host, or for highlighting a line and pressing f8 instead of running the full script. tis a bummer if ise goes away.
4
3
3
u/Toolazy2work 9d ago
The one thing I hate about vs code is I have to save the script before I run it. I can just run it from the editor without saving. With that, it would be perfect.
0
u/Inner_Importance278 9d ago
Enable autosave on run?
3
u/ankokudaishogun 9d ago
I think the issue is saving it in first place. Probably as the intention is testing the script before "committing" it to physical memory?
1
u/Toolazy2work 8d ago
Exactly. I just want to be able to edit and test. Maybe this is a snippet of a larger script I am troubleshooting and just want to test this portion. Or I need a one off and prefer to use the editor than the shell.
2
u/ankokudaishogun 8d ago
To be fair, VSCode does let you write and run powershell scripts without needing to save.
Setting it up so it's the default state when called upon might require a bit of tinkering but should be doable without too much effort.May i suggest asking in /r/vscode ? Yours don't seem an uncommon problem, so there is probably already community-made extension or set of settings available for it.
1
u/Toolazy2work 8d ago
Ya know, I didnât really investigate because it wasnât THAT big a problem but I need to. Thank you for the push!
2
u/ankokudaishogun 8d ago
I didnât really investigate because it wasnât THAT big a problem
username checks out
Don't worry. In fact, let me know if you find something satisfactory.
I might not need it now, but one never knows(plus, I might end up with colleagues who might find it useful)
23
u/SQLDevDBA 9d ago
VS Code has an âISEâ mode you can toggle. I used it for a few days when I first switched over.
7
u/th3maj0r 9d ago
I was not aware you could do this in vs code. I'm going to go try that out right now. If it's true, I know coworker who will be elated...
7
u/SQLDevDBA 9d ago
Itâs part of the tutorial when you first install the PowerShell plugin! :)
Enjoy!
2
u/phony_sys_admin 9d ago
Yep ISE mode is what made VSCode easier for me to move to. After that, no problems ditching ISE.
1
u/SQLDevDBA 9d ago
Yep yep worked for me for a few days, then I went full VSCode mode. GitHub Copilotâs inline suggestions is just way too good to not use it. Itâs like wizardry.
10
u/Murhawk013 9d ago
I was like you using ise for my first 3-4 years then I made the switch to VS code and now hate using ISE lol
3
4
u/GrecoMontgomery 9d ago
I'm a greybeard and even I hate ISE. Always have. (and yes, I realize this comment helps no one).
3
u/ribsboi 9d ago
LOL it's all good man, we're just shooting the shit here. I just reached my 30s and I feel like a greybeard for hating VSCode and being emotionally attached to ISE.
1
u/strifejester 9d ago
Iâm going into my mid 40s and I find myself using VS Code more and more and liking it. I think it comes from using a lot of other editors though before ISE was a thing. PrimalScript is still one of my all time favorites.
1
1
1
1
u/redbirdrising 7d ago
Iâm new to PS. Initially started with ISE. But there were some issues that I needed 7+ for so I got VsCode. Maybe because I didnât spend years in ISE that it was easy for me to adapt but VScode is way better.
-1
u/Incrediblecodeman 9d ago
Ya but vscode is kind away better I recommend forcing it. Thjnk it basically lets you switch what version of powershell. And some shit ChatGPT makes only runs in 7 (I totally donât got the hang of the thing yet tho)
4
u/CryingOverSpiltRum 9d ago
Iâm with you. I have ISE mode turned on in VS Code. I also added some overlay plug-in which gives me start/stop buttons. I hate thatâs not built in. If something is going wrong you want to stop it immediately with a bright red stop square, and besides, CTL-C doesnât always work. ISE is also lightning fast to load whereas VS Code is bloated. Ultimately, I know ISEâs time is almost up though đ
4
2
1
5
8
u/sneesnoosnake 9d ago
5.1 isn't going anywhere, but 7 will also come with Windows.
4
u/Skyshark29 9d ago
Not until 7 has ISE IMO
13
u/nodiaque 9d ago
Will never happen. Theres no more development for ise. MS themself says to use vcode
The PowerShell ISE is no longer in active feature development. As a shipping component of Windows, it continues to be officially supported for security and high-priority servicing fixes. We currently have no plans to remove the ISE from Windows.
There is no support for the ISE in PowerShell v6 and beyond. Users looking for replacement for the ISE should use Visual Studio Code with the PowerShell Extension
5
u/ShrimpieAC 9d ago
Well hopefully VSCode works better with 7 because that shit was unusable sometimes with 5.1.
6
u/jstar77 9d ago
VScode is like opening walnuts with a sledge hammer.
3
3
u/jstar77 9d ago
Itâs stupid stuff like the time it takes to open, thereâs always an update to either install or ignore, simply clicking from the editor to the command line is weird, I end up typing in the editor when I think Iâm in the cli. The hints and autocomplete get in the way. Things like when I write select it yells at me and says noooo dummy youâre supposed to write select-object.
5
u/creenis_blinkum 9d ago
why does everyone hate vscode so much??? it is a text editor that has a nice folder view + extensions for formatting and autocomplete. how can it be so annoying to use??? why are you people modifying scripts directly on servers still??????
5
u/ka-splam 9d ago
how can it be so annoying to use???
Asking the real questions.
Because, contrary to thirty years of Linux and Android user shouting, UX and consistency and polish and deep integration really are things, really do make a difference, and used to be things Microsoft were unusually good at, and are what makes Apple able to go toe to toe with the combined budgets and efforts of (Blackberry, Samsung, Motorola, Nokia, HTC, Huawei, Asus, Xaiomi, OnePlus, Sony, Google, Palm, LG) and take 30% of the total smartphone market.
ISE was built for PowerShell, browsers werenât built for editing, VS Code wasnât built for PowerShell; youâre an afterthought getting âworks for meâ scraps now.
3
4
u/Andrew-Powershell 9d ago
it's not really a text editor. It's a browser that you can edit text with. There's a learning curve that is offputting to many, plus plenty of sharp edges for new folks to hurt themselves on.
0
3
u/Lost_Term_8080 8d ago
Because it is bad. It is absolutely horrendously resource intensive, requires constant patching that is almost impossible to manage, its unstable as hell, not infrequently hangs or crashes, regularly ignores environment variables and/or working directories depending on context, requires some type of set up for every single project type with an ocean of extensions, its tab completion is extremely slow to index modules sometimes just gives up, ad nauseum. It is the epitome of open source developed software with no direction or product ownership, unstable development, never ending exploits, obtuse configuration menus, etc.
I use it every day. Having a mix of PS7 and PS 5.1 necessitates that. The one thing I really like that it does for PS is that it has much better scoping than ISE but that is a small consolation prize for how absolutely terrible a product VS Code is.
4
u/Veriosity 9d ago
For one thing, because it doesn't actually replicate the experience of using ISE from a syntax highlighting perspective.
IMO... this is the basics. Step 1. I can't comprehend that they didn't make sure of this from the get-go.
But also, judging from my peers, very few people care so.. I guess I'm just a dinosaur.
4
u/CraigAT 9d ago
Doesn't it do that with the Powershell plugin?
5
u/Veriosity 9d ago
For most people - yes.
For, in my experience, a certain kind of powershell pervert/autist ... no it doesnt.
It gets like 80% there, but the edge cases drive some of us crazy. I'm one of those sickos. I also work with some other engineers who are powershell folks who are all good and love vs code. But if you are particular... it doesn't get all the way there, and the differences are super frustrating.
1
4
u/ka-splam 9d ago edited 9d ago
PowerShell is written in C#, talks to C#, and Microsoft designed the engine to be scriptable; you can give the engine some text and ask âread this as powershell code and tell me all the tokens you find and where they areâ and use that to drive syntax highlighting:
$code = âGet-Service | Where-Object Status -eq Runningâ $errors = $null [Management.Automation.PSParser]::Tokenize($code, [ref]$errors)ISE does that. It means itâs absolutely correct in every weird complex corner case or edge-case, it picks up every new language feature at least to give it an âunknownâ colour, it doesnât get confused by nested code blocks. It does what the runtime will do because they share the same âread my scriptâ code.
With an old style language like C, you write code in one of many editors, then compile it; the compiler is a black box, and there are lots of different compilers by different vendors which are all a bit different. Editors couldnât script the compiler[1] so they do highlighting by string search for patterns like âfunction name and parameters looks like thisâ, âvariable declaration follows this patternâ, etc.
VS Code does this, because this can be used on any programming language and import lots of syntax highlighting rules from existing text editors. The pattern search is pretty good because programming languages are quite regular, but itâs separate from the engine which runs powershell, itâs not âpowershell awareâ, and the pattern search (regex) is too limited to follow deep nesting, edge cases, code styles that are in PS and not in other languages, doesnât handle new language features.
The whole VS Code experience is âwhat if you tried to make a shanty town out of a web browser, TextMate regexes, JavaScript, Electron, a terminal wrapper, Git, and thousands of peopleâ
The ISE experience is âwhat if you used a focused Visual Studio component from a really good old school team at Microsoft and integrated it into powershell in the days when MS still had planning and program managers and quality assurance and above average developersâ.
[1] then a good IDE would include a parser/tokeniser for each language inside it to do this well. Thatâs the kind of thing JetBrains, Borland, etc. do.
2
u/lincruste 9d ago
why does everyone hate vscode so much
Don't ask questions you don't want the answers to.
7
u/belibebond 9d ago
For everyone who hate vscode and fondly miss ISE, make peace with it. For one itâs not going to happen. Secondly vscode offers way more (annoyingly more) than ISE.
For those who said they like ISE for fact that it shipped on all machines so it was easy for one of edit/ quick edit, startup time, run without save etc⊠this is all downside of ISE. Moving to vscode has made me code better (although it felt forced at times). Git and version control which is huge for scripts are native in vscode and non existent in ISE.
3
u/neko_whippet 9d ago
So techicly in 27h2 5.1 is removed and 7: is auto installed if not installed already ?
1
u/sneesnoosnake 9d ago
Everybody is saying 5.1 will be a Feature on Demand but the linked article doesn't say. Highly doubt it because they still want 5.1 scripts to work out of the box.
2
u/PS_Alex 9d ago
The article doesn't say it, but it is listed in the accompanying KB article (KB5137172 - Windows PowerShell 5.1 Deprecation, under the "Timeline" section) that starting 27H2, Windows Powershell 5.1 is going to be transition to a Feature on Demand enabled by default.
1
u/sneesnoosnake 9d ago
We use PS5.1 scripts during initial PC setup so it not being available off the bat is a problem
1
u/TheThirdHippo 6d ago
Time to check that they are compatible with 7.x or make your first script winget install Microsoft.PowerShell51
1
u/sneesnoosnake 6d ago
The scripts run through RMM under the system account and winget doesn't work well under the system account. Will have to use another method.
2
u/grimson73 9d ago
Ah therefore they brought back the 5.1 suffix to the shortcuts for windows powershell. It wasnât long ago this suffix was removed but with the October updates itâs back
2
u/darkn3rd 4d ago
Donât care about this, as already use Powershell 7. I donât use MSIX, and install packages with Chocolatey
1
u/RikiWardOG 9d ago
I thought the reason they weren't ever going to do this was because of not being stuck to windows update cycles so they could push faster updates to it?
1
u/sneesnoosnake 9d ago
Domain join and machine account: Add-Computer, Remove-Computer, Reset-ComputerMachinePassword, Test-ComputerSecureChannel â no native replacement. Use netdom/nltest or a 5.1 session.
System Restore: Checkpoint-Computer, Disable-ComputerRestore, Enable-ComputerRestore, Get-ComputerRestorePoint, Restore-Computer â no replacement
Transactions: Complete-Transaction, Get-Transaction, Start-Transaction, Undo-Transaction, Use-Transaction â no replacement
Other: Get-ControlPanelItem, Show-ControlPanelItem, New-WebServiceProxy (for SOAP, use Invoke-WebRequest)
Other modules
Diagnostics: Export-Counter, Import-Counter â relog.exe. Get-Counter still works.
Utility: Convert-String, ConvertFrom-String
CIM: Export-BinaryMiLog
1
1
u/The-WinterStorm 7d ago
Hasn't this been coming to windows since the early days of windows 10? I swear I remember using this as a "test" years ago.
1
u/Over_Dingo 7d ago
Powershell 7.7 and 7.6.10 were released on the same day. Powershell 7.7 is the first to lack .msi package and now only has msixbundle, that is 3x the size.
https://github.com/powerShell/powerShell/releases/tag/v7.7.0
https://github.com/powerShell/powerShell/releases/tag/v7.6.10
1
u/Lost_Term_8080 7d ago
This is going to be ugly.
PS7 is a nightmare to support on system-wide installations that are normal on servers for automation.
Syntax differences will be extremely annoying to deal with, but at least those are largely straightforward. I am extremely concerned about PS 7 being very optimization sensitive to perform adequately. Or the sheer number of non-optional ps profile customizations to make it useful for ad hoc usage that cannot be cleanly centrally managed without mdm.
strict mode and scoping implementation is a little bit different that may or may not require non-obvious script modifications to get to compile.
1
u/itgforlife 18h ago edited 17h ago
One thing that burned me that isn't mentioned in your article is that you have to use -Force when you import a script if you want the function to be able to reflect updated code after import. This is the default behavior of just about every other programming language I've used e.g. VBA, Python, JavaScript, etc. But it is not the defaault behavior for PowerShell.
0
63
u/defcon54321 9d ago
msix is a disaster. They need to bring back the msi until msix works at machine level with 1:1 parity. Hello server core? Noone likes appx.
I can't understand the caustic audacity folks have to remove capability without fixing the underlying problems first. It is probably just wreckless vibe coding at this point.
Everyone is going to run 7.6.9 on servers until something meaningful changes. This is a much worse situation leaving folks vulnerable without a path forward.