Simple form development using PowerShell
PowerShell Community
by Rod Meaney
1M ago
PowerShell is a tool for the command line. Most people who use it are comfortable with the command line. But sometimes, there are valid use cases to provide Graphical User Interface (GUI). Important caveat As PowerShell developers we need to be careful. We can do insanely complicated things with GUI’s (and the .NET classes), and that is not a rod we want to make for our own back! Forms are based on .NET classes, but I have implemented a framework, so you do nothing more than create a JSON configuration and write simple functions in PowerShell. These functions are event-based functions contain ..read more
Visit website
Creating a scalable, customised running environment
PowerShell Community
by Rod Meaney
1M ago
Often people come to PowerShell as a developer looking for a simpler life, or as a support person looking to make their life easier. Either way, we start exploring ways to encapsulate repeatable functionality, and through PowerShell that is cmdlets. How to create these is defined well in Designing PowerShell For End Users. And Microsoft obviously have pretty good documention, including How to Write a PowerShell Script Module. I also have a few basic rules I remember wehen creating cmdlets to go along with the above posts: Always use cmdlet binding. Call the file name the same as the cmdlet, w ..read more
Visit website
Using PowerShell and Twilio API for Efficient Communication in Contact Tracing
PowerShell Community
by Piyush Tripathi
4M ago
The COVID-19 pandemic has underscored the importance of rapid and reliable communication technology. One vital application is in contact tracing efforts, where prompt notifications can make a significant difference. This guide focuses on utilizing PowerShell in conjunction with the Twilio API to establish an automated SMS notification system, an essential communication tool for contact tracing. Integrating Twilio with PowerShell Before diving into scripting, you need to create a Twilio account. Registering and Preparing Twilio Credentials Once registered, obtain your Account SID and Auth Token ..read more
Visit website
Automate Text Summarization with OpenAI and PowerShell
PowerShell Community
by Piyush Tripathi
5M ago
Automating tasks is the core of PowerShell scripting. Adding artificial intelligence into the mix takes automation to a whole new level. Today, we’ll simplify the process of connecting to OpenAI’s powerful text summarization API from PowerShell. Let’s turn complex AI interaction into a straightforward script. To follow this guide, you’ll need an OpenAI API key. If you don’t already have one, you’ll need to create an OpenAI account or sign in to an existing one. Next, navigate to the API key page and create a new secret key to use. Step-by-Step Function Creation Step 1: Define the Function and ..read more
Visit website
Changing your console window title
PowerShell Community
by Francisco Nabas
10M ago
As our skill as a PowerShell developer grows, and the complexity of our scripts increase, we start incorporating new elements to improve the user experience. That might include changing fonts, the background color, or the console window title. This task was already discussed in a blog post from 2004, Can I Change the Command Window Title When Running a Script?. However, the post uses VB script, and changes the title if you are willing to open a new console. Today we learn how to do it with PowerShell, using the same window. Methods We will explore two ways of changing the console window title ..read more
Visit website
Measuring average download time
PowerShell Community
by Francisco Nabas
10M ago
One of the most overlooked roles of a systems administrator is to be able to troubleshoot network issues. How many times had you been in a situation where your servers are problematic, and someone asked you to check the network connectivity? One of the steps is checking downloading time, and speed, and although there are countless tools available, today we will learn how to do it natively, with PowerShell. Methods We will focus on three methods, ranging from the easiest to the most complex, and discuss their pros and cons. These methods are the Start-BitsTransfer Cmdlet, using .NET with the Sy ..read more
Visit website
Measuring script execution time
PowerShell Community
by Francisco Nabas
1y ago
Most of the time while developing PowerShell scripts we don’t need to worry about performance, or execution time. After all, scripts were made to run automation in the background. However, as your scripts become more sophisticated, and you need to work with complex data or big data sizes, performance becomes something to keep in mind. Measuring a script execution time is the first step towards script optimization. Measure-Command PowerShell has a built-in cmdlet called Measure-Command, which measures the execution time of other cmdlets, or script blocks. It has two parameters: Expression: The ..read more
Visit website
Porting System.Web.Security.Membership.GeneratePassword() to PowerShell
PowerShell Community
by Francisco Nabas
1y ago
I’ve been using PowerShell (core) for a couple of years now, and it became natural to create automations with all the features that are not present in Windows PowerShell. However, there is still one feature I miss in PowerShell, and this feature, for as silly as it sounds, is the GeneratePassword, from System.Web.Security.Membership. This happens because this assembly was developed in .NET Framework, and not brought to .NET (core). Although there are multiple alternatives to achieve the same result, I thought this is the perfect opportunity to show the Power in PowerShell, and port this method ..read more
Visit website
Designing PowerShell For End Users
PowerShell Community
by Stephen Valdinger
1y ago
PowerShell, being built on .NET and object-oriented in nature, is a fantastic language for developing tooling that you can deliver to your end users. These may be fellow technologists, or they could also be non-technical users within your organization. This could also be a tool you wish to share with the community, either via your own Github or by publishing to the PowerShell Gallery. What Are You Doing? When setting out with the task of developing a tool you should, as a first step, stop and think. Think about what problem your tool is trying to solve. This could be a number of things Creati ..read more
Visit website
Convert Specific Table of Excel Sheet to JSON
PowerShell Community
by Sonam Rastogi
1y ago
There is an excellent script on GitHub that helps to convert a full Excel sheet to JSON. The script expects the table to be at the start of the sheet; that is, to have the first header in the A1 cell. I had a little different requirement. I had to convert a specific table among various tables available within a sheet in an Excel file as shown in image below. Our requirement is to read Class 6 students’ data. In the above screenshot, there are multiple sheets within the Excel workbook. There are multiple tables like Class 1, Class 2, and so on inside the Science sheet. As our requirement is to ..read more
Visit website

Follow PowerShell Community on FeedSpot

Continue with Google
Continue with Apple
OR