How to add PowerShell 7 preview 4 to Windows Terminal

In case you’ve missed the latest update, there’s a new release for PowerShell v7 out!

Surely everyone’s also using Windows Terminal, so what better than to enable PowerShell v7 within Windows Terminal!

To do so, open Windows Terminal and go to Settings which will open the profiles.json file in your favourite editor [surely Visual Studio Code 😉 ].

Here you will have to add a profile to the “profiles”: section.

Be sure to check if the “commandline” and “icon” path are correct for you environment and also be sure to add a , either before or after your profile to make sure your JSON is still valid.
A full example profile can be found here!

Final result as expected:

Happy scripting! 🙂

twitterredditlinkedinmail

New module – PSP-Inventory

I’ve finally gotten around actually creating a module that I though would be ‘up-to-par’ to upload to the PowerShell Gallery: PSP-Inventory !

In case you need to inventorise an environment for various elements, this might be great for you!

The following items are collected for you:

  • System Info [CPU/Mem etc]
  • Operating System Info
  • Disk Info
  • Network Info
  • Installed Software
  • Installed Security Updates
  • Installed Server Roles
  • Installed Certificates
  • Scheduled Tasks
  • Local Groups
  • Local Users
Quickly collect all information required
Quickly collect all information required
Objects are formatted for an easy on the eye display, but contain every bit of info you might require
Objects are formatted for an easy on the eye display, but contain every bit of info you might require

If you’re interested in more, you can simply install the module from the gallery

or visit the GitHub page for more information.

If there’s anything you’re like to see added or if you’ve found any bugs, please feel free to let me know in the Issues section, I’m actively trying to tackle all open Issues!

Happy scripting! 🙂

twitterredditlinkedinmail

QR codes and practical usage

Earlier this year I was lucky to attend the PowerShell Conference Europe [a.k.a. PSConfEU], which is easily the geek highlight of my year.

At the Opening ceremony, organizer and PowerShell GURU Dr. Tobias Weltner showed this gem that amazed me in it’s simplicity

I present you: the QRCodeGenerator

As the name implies, the QRCodeGenerator will generate various QR codes for you to use, all through the magic of PowerShell [and of course the QR generator solution in C# which this module uses].

Of course now we’ll want to play with it, so let’s get the module!

Let’s just assume by now you’ll have at least [Windows] PowerShell 5+, if you don’t, please get it ASAP [or get PowerShell Core instead]!

When searching the PowerShellGallery, you should be presented by the last version

Go ahead and install this module for yourself

or for everyone on your system [be sure to run PowerShell as Administrator]

Ok, so now what?

Let’s see what options we have available

So we can create a new

  • GeoLocation QR Code
  • vCard QR Code
  • Wifi Access QR Code

As expected, each of the provided cmdlets come with properly created help files, examples and all 3 cmdlets have similar input parameters, mainly

  • Width – height and width of the generated code [default is 100]
  • Show – open the generated code in default program
  • OutPath – path to generated png file. If left empty, a temporary file name will be used.

Practical applications

To be honest, the 2 main reasons I liked this are the Wifi Access and vCard codes.
While there might be some use for the GeoLocation one, I would think it’d mainly be in like print media, to display your company’s location information or such.

The New-QRCodeWifiAccess cmdlet can be used at home or at work provide access to your guest wifi network.
Simply generate the code, print and laminate it once and whenever people ask for access, just let them scan the code!

And tada!

As for the New-QRCodevCard cmdlet, it works just the same. In this case I would recommend using it on your business card to allow your contact to easily add you in her/her phone.

 

All in all, I thought this was thing to share, I hope you think so too!

Happy Scripting! 🙂

 twitterredditlinkedinmail