6 min read
Using .NET Libraries in PowerShell - GUI dialogs and case-correcting text
In the previous two parts, we looked at a few .NET types and ways to “look inside” and find their hidden methods. This...
Unlocking the Power of PowerShell: Tips for Success
Want to keep track of your PowerShell commands effortlessly? This article reveals a simple way to copy your command history to the clipboard, making it easy to save and reuse your scripts. Plus, learn how to filter commands from the last 15 minutes, helping you focus on recent tasks. Discover how this handy tip can streamline your workflow and enhance your productivity in PowerShell!
If you played interactively with PowerShell and then discovered that you’d like to keep the code that you just executed, here is a useful line:
(Get-History).CommandLine | Set-ClipBoard
It copies your entire command line history to the clipboard so you can easily paste it to your favorite editor and save it.
If your history is very large, you can add time filtering. This will get you just the commands from the past 15 minutes:
(Get-History | Where-Object StartExecutionTime -gt (Get-Date).AddMinutes(-15)).CommandLine | Set-ClipBoard
Unleash the full potential of PowerShell with our handy poster. Whether you're a beginner or a seasoned pro, this cheat sheet is designed to be your go-to resource for the most important and commonly used cmdlets.
The poster is available for download and in paper form.
Mar 26, 2025 by Aleksandar Nikolić and Dr. Tobias Weltner
In the previous two parts, we looked at a few .NET types and ways to “look inside” and find their hidden methods. This...
Mar 19, 2025 by Aleksandar Nikolić and Dr. Tobias Weltner
In part 1, we began exploring how cmdlets internally rely on .NET libraries and how you can access these libraries...
Mar 11, 2025 by Aleksandar Nikolić and Dr. Tobias Weltner
Most PowerShell cmdlets are simply wrappers around underlying .NET libraries. In this series, we’ll take a closer look...
Tobias Weltner and Aleksandar Nikolić joinly wrote the blog post series 'Tobias&Aleksandar's PowerShell tips'. So we introduce both of them here:
----------------------------
Aleksandar Nikolić is a Microsoft Azure MVP and co-founder of PowerShellMagazine.com, the ultimate online source for PowerShell enthusiasts. With over 18 years of experience in system administration, he is a respected trainer and speaker who travels the globe to share his knowledge and skills on Azure, Entra, and PowerShell. He has spoken at IT events such as Microsoft Ignite, ESPC, NIC, CloudBrew, NTK, and PowerShell Conference Europe.
----------------------------
Tobias is a long-time Microsoft MVP and has been involved with the development of PowerShell since its early days. He invented the PowerShell IDE "ISESteroids", has written numerous books on PowerShell for Microsoft Press and O'Reilly, founded the PowerShell Conference EU (psconf.eu), and is currently contributing to the advancement of PowerShell as member in the "Microsoft Cmdlet Working Group". Tobias shares his expertise as a consultant in projects and as a trainer in in-house trainings for numerous companies and agencies across Europe.