>> Hi. I'm Sydney.
>> I'm Joey, and we're PMs on the PowerShell team.
>> So Joey, what are you working on over there?
>> I was just doing some housekeeping
here with an Ubuntu VM I've got up an Azure.
I was going to do some little tech chores here.
Hop on over and of course,
I got to fire up PowerShell since we are on the PowerShell team.
>> Joey, is that the update notification?
Have you not upgraded to RC2 yet?
>> I guess I've been forgetting.
Yeah. This maybe I don't use this VM too often.
Yikes. Well, I should probably do an update here.
>> Yeah, definitely.
>> Definitely want a sudo apt update,
but it's actually is a great opportunity for me to show
off the new pipeline chain operators. Have you heard about these?
>> I have, but I don't totally
understand how they work. Could you explain them again?
>> Yes. So there's there's two operators here,
you've got the && and then the pipe,
pipe, which is like or, or.
So I'll show up the first one here, this &&.
So let me type this out and then I'll show you what's going on.
So basically, you've got this command on
the left-hand side and the && says, "Hey,
for the command on the right-hand side,
I'm actually not going to run that command,
unless the first command is executed successfully."
>> Okay.
>> So if I get a dollar question mark set to true,
which means that that command was able to
execute without throwing an error,
then we're actually going to do the install here on the right.
So first thing, update
the apt repo cache and then update PowerShell.
>> Very cool, and do you know that
updating the repo cache reminds me of?
>> What's that?
>> PowerShellGet 3.0 coming soon.
>> That's right. Yeah, that's going to have
a local update cache as well.
So we're going to have to be teaching users how to use
this exact pattern here with PowerShellGet v3.
>> Totally, yeah, and I can see
why those operators are so popular,
it seems very useful.
>> It's very useful especially in
test and build environments and that sort of thing,
when you want to make sure that all your steps are
completing successfully before you move on to new ones.
So it looks like we were able to update here.
If I run upgrade,
excuse me, let me go ahead and execute this,
and we should get the latest version of PowerShell.
So you'll see that RC2 is downloading.
We were able to update the repo caches successfully up here.
It's hit and then we're going to get a download and install.
Awesome. So of course,
I'm going to have to restart PowerShell to get the new version.
I'm still here stuck in RC1.
But if I go ahead and switch over to pwsh-preview,
you will see boom, there I am on RC2,
no more update notification.
>> Awesome, very cool.
>> That's awesome. So what have you been working on, Sydney?
>> Well, I've actually also I've been working
on playing with some of the new features in PowerShell 7.
>> Oh, yeah.
>> Yeah. Do you want to see my screen?
>> Yeah. Wait, what's all that blue you got over there?
>> This? This is the Visual Studio code,
PowerShell extension in ISC mode.
It's one of the features we recently added.
It gives you some of the shortcuts from
the ISC and it also gives you that familiar color scheme.
>> I love it. I loved the ISC it's really awesome,
to see you bringing some of that back.
>> If you want to flip into it, just control shift P,
open the command palette,
and you can enable and disable it as much as you'd like.
>> Nice.
>> Yes. So, do you remember Out-GridView?
>> Yeah. It was super popular in Windows PowerShell,
but we haven't had it working for awhile, right?
>> Right. But with.NET Core 3.1,
we've actually been able to bring back a lot of
the Windows commandlets, including Out-GridView.
>> That's awesome, can you show it to me working here?
>> For sure. So here I'm grabbing some services.
I'm using selection to grab the one I specifically want.
Here, I'm grabbing the ssh-agent
and then I'm able to restart that service.
>> Nice. I hear this is
pretty popular with database administrators as well.
>> Absolutely. Our users
in Azure Data Studio with the PowerShell extension,
absolutely love Out-GridView selection and they're
really excited that this is going to be part of PowerShell 7.
>> That is awesome, I can't wait to see it out there in the wild.
>> Yeah. Well, can I show you something else
cool from PowerShell 7 that I've been working on?
>> Totally.
>> Okay, cool. So here I'm pulling in
some providers and grabbing their Win events.
>> So you've got a list of ETW providers here.
You're going to pull all their Win events
and then stuff them into a variable?
>> Absolutely. So ordinarily,
I've been using for each object to run this and so then
it sequentially processes each commandlet,
each Win event and that's been fine,
but it's not been as fast as I would like it to be.
>> How long did this just take here?
>> Well, this one just took me 16 seconds.
>> Sixteen seconds? I think we could do better than that.
>> I think so too. Luckily, we have for each object parallel,
which allows this script block to be processed in parallel.
>> Nice. So you're actually spinning up
a separate run space for each of
the providers hitting the pipeline
and collecting all of their logs in parallel?
>> Exactly. So it's still all on
my local machine and it's all in the same PowerShell process,
but it's using separate runs spaces to speed up their performance.
>> So how much faster did we get?
>> We got down to seven seconds.
>> Nice.
>> Yeah, and this is pretty awesome with this task,
but imagine the stuff that takes us an hour to run.
>> Yeah. If you were doing twice as fast,
the more logs and the bigger they are,
you're just going to get better and better gains.
>> It's amazing. I can't believe we fit
all this stuff into PowerShell 7.
>> It's crazy. Then we've got
all the secrets management in
PowerShellGet work that is coming out to, right?
>> Yeah. A lot of previous to look forward to.
Make sure that you're checking,
aka.ms/psblog for all the latest updates
on the things we're working on.
>> I'll definitely keep my eyes peeled.
>> Absolutely do.
>> Until next time.