yesterday
|
Adam Bertram
Learn how to use the PowerShell change directory command to navigate your file system with ease. Master the basics of PowerShell file navigation today.
2 days ago
|
Christian Ritter
Enhancing PowerShell objects with Update-TypeData
Sometimes the objects that PowerShell cmdlets return don't have all the properties and methods that you need.
Fortunately, PowerShell provides a way to extend these objects using a feature called extended type data (ETD). ETD lets you add, remove, or modify properties and methods of a type, such as a .NET class or a PowerShell object.
One way to add new properties to PowerShell objects is by using the Update-TypeData cmdlet.
3 days ago
|
Harm Veenstra
I've been using the WinGet command-line version for quite some time now, and I am pleased with the apt-get-like installation method for installing/updating/removing software on my Windows machines. (WinGet is also the new Windows Store installation option for Microsoft Intune) But there's also a PowerShell module for WinGet, still in preview (Alpha) but very functional already. I will show you how to use that module in this blog post.
3 days ago
|
Christian Ritter
Enhance Your PowerShell Scripting with Trapping
This blog post explains how to use the trap statement in PowerShell to improve error handling, reduce code size, and make scripts more organized and readable.
PowerShell's $trap statement is one of the most underutilized features, in my opinion. It can reduce code size, increase readability, and improve organization in your scripts. In this post, I will demonstrate how to use trapping to respond to errors in a uniform manner and handle different error types.
3 days ago
|
Christian Ritter
Enhance Your PowerShell Scripting with Default Parameter Values
In this post, we'll take a closer look at the benefits of using default parameter values in PowerShell. As we previously explored in our discussion of splatting, setting default values for parameters in your commandlets or functions can make your scripts more efficient and easier to maintain.
To set default parameter values in PowerShell, you can use the $PSDefaultParameterValues preference variable.
5 days ago
|
Dave Carroll
Introduction
A few years ago, maybe the first part of 2019, I was asked to contribute a chapter for the PowerShell Conference Book Volume 2.
So much has happened since then and I don’t remember who did the asking.
The odds are decent enough though to guess Mike Kanakos.
This article is the first in a series of three which will be a republishing of my chapter on soft skills.
I’ve only gently edited a few items from the original material.
6 days ago
|
Christian Ritter
How Splatting in PowerShell Can Improve Your Code's Aesthetics and Reduce Volume
Have you ever found yourself struggling with long, unwieldy PowerShell commands? You're not alone. Backticking can be a tempting solution, but it can also make your code harder to read and maintain.
Splatting is a technique that uses a hash table to pass a set of parameters to a command. Instead of passing each parameter as a separate argument, you can pass a hash table with the parameter names and values, and then use the splatting operator (@) to expand the hash table as arguments to the command.
6 days ago
|
Doug Finke
How to Set up and Use ChatGPT in Windows Terminal using PowerShellAI
Introduction
ChatGPT is a powerful language model developed by OpenAI. It has been widely used in various applications, including chatbots, text completion, and language understanding. It powers GitHub Copilot, a code completion tool that helps developers write code faster. It also powers the Microsoft 365.
In this blog post, I will guide you on how to set up and use ChatGPT in the Windows Terminal using PowerShellAI module.
7 days ago
|
Christian Ritter
Dotnet or not Dotnet this is the question we will ask in this post
Lets find out if the .NET .Where() method is significantly faster than their equivalent in native PowerShell
In this post, we'll compare the performance of native PowerShell methods with their .NET counterparts, specifically focusing on the .Where() method. We'll also use the [Linq.Enumerable] class to analyze a different dataset – passenger data from the Titanic – instead of the usual Active Directory user data.
7 days ago
|
Ryan Yates
I have been running a dev system for a number of years that has had every Windows Insider build on it since I got this machine back in December 2019, & along the way we’ve seen plenty of new ways for you to get your hands on the latest versions of PowerShell. These also have some additional update mechanisms too, like via the store and Microsoft Update.
So I was a tad confused when I’d gotten an update notification in Windows Update for PowerShell Preview, version 7.
7 days ago
|
Christian Ritter
String concatenation performance boosting - is this too much ado about nothing?
Concatenating strings is a common operation in programming, but did you know that there are different methods you can use to do it? In this post, we will explore four popular methods for string concatenation in PowerShell and compare their performance.
The Methods
The four methods we will focus on are:
+= operator
-join operator
[string]::Concat() method
StringBuilder class with the .
8 days ago
|
Christian Ritter
.NET or not .NET this is the question, we will ask in this post
Lets find out if the .NET .ForEach() method is significantly faster than their equivalent in native PowerShell
The most of us are interested in making the code faster, with that in mind I want to have a look about foreach loops and and their .NET equivalent. I also want to see if the piped ForeachEach-Object{} may be is a game changer.
8 days ago
|
Dave Carroll
I’m ready for PowerShell Summit 2023!
I’ve been part of the PowerShell community for a few years now and I’ve attended some amazing sessions with user groups.
I’ve also presented a few times, once for a PowerShell Saturday and a couple other times remotely.
For Summit ‘21, I had a presentation via video on demand and a lightning demo.
Over the last few years, I’ve been ask how many times have I attended PowerShell Summit.
10 days ago
|
Christian Ritter
Today I would like to show you special interest topic: Padding and Parameters
This post won't cover all off the aspects of parameters in PowerShell or neither everything you can do with the padding of a string.
Sometime ago I created a little logging function, please don't tell: @FredWeinmann the creator of the fantastic: PSFramework.
By doing this I struggled with the textual output of the log to the console.
10 days ago
|
Adam Bertram
Learn the basics of PowerShell Select-Object with this beginner's guide. Simplify your commands and streamline your workflow with ease.
10 days ago
|
Harm Veenstra
An excellent way to run your scripts is by using a Stream Deck 🙂 I purchased one last month (Elgato Stream Deck Mk 2 Studio Controller with 15 buttons), mainly because of the Microsoft Teams support, but you can use it for PowerShell too! In this blog post, I will show you a few examples.
10 days ago
|
Christian Ritter
Today I would like to show you a performance table comparing different ways to sort a list/array unique.
Sometimes it is necessary to sort a list or an array unique to get rid of duplicates this can be a time consuming task
In this post we will have a look at 3 ways to sort a list unique.
Sort-Object -Unique
Get-Unique
HashSet-Class
First we will create 3 different lists containing random strings in several sizes (small, medium, large)
#List elements
$ListOptionA ="Blue","Red","Green"
$ListOptionb ="Dog","Horse","Cat"
#Create a small set of strings based on list elemtents and a random number
$ListSmall = (0.
10 days ago
|
Luc Fullenwarth
Here is a method to build a global array at the same time you collect data from various parts of a tree.
No need for additional code to concatenate the data.
11 days ago
|
Faris Malaeb
PowerShell scripting is an essential skill each sysadmin has to know as it provides an efficient and reliable way to automate IT tasks. When it comes to using AI technology to enhance PowerShell scripting, two of the most prominent options are Bing AI and ChatGPT. While both offer unique features and benefits, it’s important to...
The post Bing AI VS. ChatGPT, Which One is Better in PowerShell appeared first on Faris Malaeb.
11 days ago
As an Azure administrator, maintaining a clean and secure environment is crucial. One aspect of keeping Azure organized is managing role assignments. Over time, you might end up with unused or “Unknown” role assignments, which can make management more challenging and potentially introduce security risks.
In this blog post, we’ll walk you through a handy PowerShell script to automate the cleanup of role assignments with an object type of “Unknown” in your Azure environment.
13 days ago
|
Emil Larsson
Intro The PowerShell-Docs repository is the home of the official PowerShell documentation. It contains reference and conceptual content for various versions and modules of PowerShell. Contributing to this repository is a great way to learn Git, Markdown and PowerShell, as well as to help improve the quality and accuracy of the documentation.
In this blog post, I will show you how you can contribute to the PowerShell-Docs repository by doing quality contributions, and why it’s beneficial for your learning and development.
13 days ago
|
Emil Larsson
The module “Z” is a handy tool that can save you lots of time when navigating around your terminal. In this blog-post, we’ll cover how to install it to user scope, how to configure it by jumping around the terminal to different places, and how it saves lots of time in the long run.
Installing Z to your CurrentUser scope To install Z, open a PowerShell terminal and run the followi
15 days ago
|
Bradley Wyatt
Recently, I set out on populating a test Active Directory environment from a production environment. This included populating Active Directory Users and Computers with my users from production. I figured I could quickly export my users from production to a CSV file, include any properties I wanted to import over to the test environment, and then create the new users based on the CSV file using New-ADUser and Set-ADUser respectably.
16 days ago
|
Jeff Hicks
A few weeks ago, I was working on content for a new PowerShell course for Pluralsight. The subject was objects. We all know the importance of working with objects in PowerShell. Hopefully, you also know that the output you get on your screen from running a PowerShell command is not the whole story. Formatted presentation...
17 days ago
|
Harm Veenstra
This is one of the most used tools in PowerShell that I use, an excellent way of storing and using data for reporting purposes. In this blog post, I will show you how to use it to your benefit.
19 days ago
|
Emil Larsson
Active Directory Access Granting The following module is very important for a Active Directory operations or engineering type person. Most who have tried granting permissions outside of adding users to groups in Active Directory would probably agree that, access delegation can be a daunting task.
Your best bet is to use the Delegation wizard, but wheres the fun (PowerShell fun..) in that. And how well does it scale? Not very well.
20 days ago
|
Bradley Wyatt
Microsoft has recently announced that on September 30th, 2023, Azure Automation RunAs accounts, including Classic Run As accounts, will be retired so you will need to migrate your runbooks to managed identities for authentication. Managed Identities provide the same functionality as a RunAs accounts, plus:
Secure authentication to any Azure service that supports Azure Active Directory (Azure AD) authentication.
21 days ago
|
Darren Robinson
This week as part of the SailPoint Developer Days 2023 conference the SailPoint Developer Relations team proudly announced the official SailPoint IdentityNow PowerShell SDK. They also announced Typescript and Go, but I’m sure you’re here for PowerShell.
I was very proud to be included in the announcement with Jordan Violet the head of Developer Relations at SailPoint and then followed up by Philip Ellis who gave an overview of the SDKs.
22 days ago
|
Adam Bertram
Get to grips with Windows PowerShell IP Configuration. Learn the basics of configuring IP addresses and troubleshooting network problems with PowerShell!
22 days ago
|
Alexander Koehler
UPDATE 15/03/2023: After Installation of MS Exchange SU March 2023 the issue is resolved! Download Links March 2023 SU Exchange Exchange Server 2013 CU23 (note that support and availability of SUs end on April 11, 2023) Exchange Server 2016 CU23 Exchange Server 2019 CU11 and CU12 Some people may recognize an error when entering the good old Exchange Toolbox they receive a …
Read more "Exchange Toolbox Unhandled Exception – Deserialization fails"
Articel Exchange Toolbox Unhandled Exception – Deserialization fails available first on IT koehler blog.
22 days ago
|
Darren Robinson
Yes, it is 2023 and you did read the title correctly. Searching LDIF Files with PowerShell. But why?
Something I learned a few decades ago in Identity Management is that when you go live with an identity solution that updates Active Directory, you will get blamed for changes you didn’t do.… keep reading
The post Searching LDIF Files with PowerShell appeared first on darrenjrobinson - Bespoke Identity and Access Management Solutions.
24 days ago
|
Harm Veenstra
When testing Functions in PowerShell or just executing cmdlets, you don't always get enough information when things don't work. The Trace-Command cmdlet is a valuable tool that gives you much information about what's going on behind the scenes. In this blog post, I will show you how to use it.
one month ago
|
Jeff Hicks
This post is an updated reprint from an article published to my premium PowerShell newsletter Behind the PowerShell Pipeline available on Substack. Subscribers receive 6-8 articles like this a month delivered to their inbox or available on the Substack app. I hope you’ll consider subscribing. Trial subscriptions are available. I’ve been scripting and automating things...
one month ago
|
Harm Veenstra
I like using Visual Studio Code as my PowerShell script editor, but alternative editors exist. The built-in PowerShell ISE is usually there for you on Windows, but there's a nice PowerShell module that you can use called PSEdit. In this blog post, I will show you how to use that as an alternative to VSCode.
one month ago
|
Harm Veenstra
You often repeat certain standard things when writing scripts in Visual Studio Code. Wouldn't it be nice if we could simplify that? This blog post will show you how to use VSCode Snippets to your advantage!
one month ago
|
Mike Robbins
The $env:PSModulePath environment variable contains a list of directory locations that PowerShell searches to locate modules.
$env:PSModulePath When you’re trying to determine what paths are part of the $env:PSModulePath environment variable in PowerShell, you’ll find that most examples split the results on the semicolon (;) character to return each path on a separate line.
$env:PSModulePath -split ';' Another variation is to use the Split method instead of the operator.
one month ago
|
Alexander Koehler
In daily life there are a lot situation where you have to copy members of AD groups, or checking if someone is member of an AD group. Therefore I created this blogpost to provide a small assistance doing this tasks via powershell. Function to check user Group Membership Here is a short function checking if …
Read more "PowerShell and AD groups best combination"
Articel PowerShell and AD groups best combination available first on IT koehler blog.
one month ago
|
Harm Veenstra
I had to check many log files of an Exchange 2016 server to see which clients or applications were on which Exchange Send Connector and what emails were being received on which Receive Connector. A nice thing to do using PowerShell :) This blog post will show you how to get a simple overview of the logs.
one month ago
|
Bradley Wyatt
Many IT organizations do not allow their end users to be local administrators on company endpoints, and for good reason. But one issue I have ran across is that some applications install an icon on the public desktop (C:\Users\Public\Desktop) and the end user is unable to delete the icon as it requires administrative rights. Using PowerShell, we can modify the ACL of the public desktop folder and allow our non-admin users to delete these shortcuts.
one month ago
|
Kieran Jacobsen
Over the last few weeks, I have been working on some new features in Planet PowerShell.
Mastodon Support
As more users make the move to Mastodon, I wanted to ensure that Planet PowerShell could continue to support the community.
You can now follow Planet PowerShell on Mastodon, @
[email protected] New posts are automatically tooted using the #PowerShell and #pwsh hashtags.
There is now support for authors to share their Mastodon handles.
one month ago
|
Harm Veenstra
I wrote blog posts about how to use an API for Slack and Twitter messages, but... Mastodon is also there now, and I thought... Ok, can I Toot in Mastodon using PowerShell? This blog post will show you how ;)
one month ago
|
Faris Malaeb
In Active Directory (AD), the PasswordLastSet and pwdLastSet attributes refer to the same property of an AD object – the time and date when the password for that object was last changed. This attribute is used to enforce password policies and track when a password was last changed. This quick post helps you understand these...
The post Understanding PasswordLastSet and PwdLastSet Using PowerShell appeared first on Faris Malaeb.
one month ago
|
Thomas Lee
This week I got the news that my latest PowerShell book has been published and is available for order:You can order it today from all the usual places, including https://smile.amazon.co.uk/Windows-Server-Automation-PowerShell-Cookbook/dp/1804614238.This book updates earlier editions and covers, specifically, PowerShell 7.2 (as an LTS release) and Windows Server 2022. It should also be useful if you are using PowerShell 7 on earlier versions of Windows Server too.
one month ago
|
Harm Veenstra
I like using MarkDown to format text and Obsidian to save my notes, and sometimes you want to export the output from cmdlets or scripts for future reference. This blog post will show you how to easily save that output to a new or existing MarkDown file.
2 months ago
|
Harm Veenstra
I think a lot of you use the SysInternals tools on your machine. They are great tools at your disposal and have helped me a lot! You can install it using the Microsoft Store method, it will be updated like that too, but for your management server, it's nice to have an installer that works without the Microsoft Store :) In this blog post, I will show you a way to install or update your SysInternals Suite.
2 months ago
|
Faris Malaeb
ChatGPT API allows developers to integrate the capabilities of ChatGPT into their applications easily. OpenAI provides the ChatGPT API, which can be accessed via an API key. The API endpoint allows you to send a prompt and receive a generated response. With its ability to understand and develop human-like text, the ChatGPT API is a...
The post Interact with ChatGPT API Using Postman or PowerShell appeared first on Faris Malaeb.
2 months ago
|
Alex Neihaus
Unlike my last post, this one is a naked attempt to get clicks. See, today Google emailed me with a suggestion to try it's "experimental" content ideas, saying that I could "get inspiration for new content from Google" for a limited time only. I'm unclear on whether this is Google saying, "Blog about this and …
Continue reading "What does $() mean in PowerShell?"
The post What does $() mean in PowerShell? first appeared on Thinking aloud.
2 months ago
|
Przemyslaw Klys
They say there is a first time for everything. For me, it's how to download and upload files to Azure Blog Storage using Connection String. Recently I was given Connection String, Container name and had to download some files from Azur Blog Storage. After some research and trying Connect-AzAccount, I found that the proper way to go is thru New-AzStorageContext.
The post Upload and Download files from Azure Blob Storage using Connection String appeared first on Evotec.
2 months ago
|
Alex Neihaus
Should PowerShell devs worry about AI replacing them?
The post Will ChatGPT replace PowerShell developers? first appeared on Thinking aloud.
2 months ago
|
Doug Finke
Running PowerShell inside ChatGPT
And the PowerShell Console
Executing PowerShell inside ChatGPT displays its remarkable ability to comprehend and evaluate PowerShell commands for you.
Chat #1
Act as a PowerShell REPL. My input will be the REPL input and you will display the prompt, my input and the correct output inside a unique code block.
$a = 5
$b = 18
($a, $b, ($a+$b), ($a-$b))
Chat #2
Act as a PowerShell REPL.