How to create a PowerShell Function
LazyAdmin | PowerShell
by Rudy Mens
6d ago
When you need to reuse a part of your scripts multiple times or need to run the same code with only different values, then you should create a PowerShell Function. PowerShell functions not only allow you to easily reuse a ... Read moreHow to create a PowerShell Function The post How to create a PowerShell Function appeared first on LazyAdmin ..read more
Visit website
How to use PowerShell Write Output
LazyAdmin | PowerShell
by Rudy Mens
1M ago
The PowerShell Write-Output cmdlet is used to send an object or variable to the PowerShell pipeline. When it’s the last command in a pipeline, then the output is displayed in the console. Write-Output is basically the PowerShell equivalent of echo ... Read moreHow to use PowerShell Write Output The post How to use PowerShell Write Output appeared first on LazyAdmin ..read more
Visit website
How to use Connect-MgGraph – All Options
LazyAdmin | PowerShell
by Rudy Mens
1M ago
The Microsoft Graph module in PowerShell allows you to interact with different Microsoft 365 services. But to use the module, you will first need to connect to Microsoft Graph, using the Connect-MgGraph cmdlet. There are different options when it comes ... Read moreHow to use Connect-MgGraph – All Options The post How to use Connect-MgGraph – All Options appeared first on LazyAdmin ..read more
Visit website
How to Install PowerShell 7 Quickly
LazyAdmin | PowerShell
by Rudy Mens
1M ago
Even though the first version of PowerShell 7 was released in 2020, you will still find PowerShell 5.1 installed by default on new Windows computers. But luckily, we can install PowerShell 7 manually and even side-by-side with the old version. ... Read moreHow to Install PowerShell 7 Quickly The post How to Install PowerShell 7 Quickly appeared first on LazyAdmin ..read more
Visit website
How to Set an Environment Variable in PowerShell
LazyAdmin | PowerShell
by Rudy Mens
2M ago
Environment variables are used by the operating system and applications to store configuration settings, system paths, and other information. All programs on your computer can access this data. We can use PowerShell to view, change, or set an environment variable. ... Read moreHow to Set an Environment Variable in PowerShell The post How to Set an Environment Variable in PowerShell appeared first on LazyAdmin ..read more
Visit website
How to use Invoke RestMethod in PowerShell
LazyAdmin | PowerShell
by Rudy Mens
2M ago
When you need to interact with an REST API in PowerShell, you will need to use the Invoke RestMethod cmdlet. This cmdlet lets you send HTTP(S) requests to a REST web service from your command line or PowerShell script. REST ... Read moreHow to use Invoke RestMethod in PowerShell The post How to use Invoke RestMethod in PowerShell appeared first on LazyAdmin ..read more
Visit website
How to use PowerShell Variables
LazyAdmin | PowerShell
by Rudy Mens
2M ago
Variables in PowerShell are used to store values, data, or other information you need later in your script. They can also used to capture the results of a cmdlet. But how do you create variables, and use them outside a ... Read moreHow to use PowerShell Variables The post How to use PowerShell Variables appeared first on LazyAdmin ..read more
Visit website
PowerShell ForEach-Object and ForEach Loop Explained
LazyAdmin | PowerShell
by Rudy Mens
2M ago
PowerShell ForEach and ForEach-Objects loops are one of the most commonly used functions. They allow you to easily iterate through collections. But what is the difference between ForEach-Object and the ForEach() cmdlets? Both cmdlets look similar, and basically, they allow ... Read morePowerShell ForEach-Object and ForEach Loop Explained The post PowerShell ForEach-Object and ForEach Loop Explained appeared first on LazyAdmin ..read more
Visit website
How to Trim a string in PowerShell
LazyAdmin | PowerShell
by Rudy Mens
4M ago
Do you need to remove the trailing spaces of a string? Or a character for the beginning or the end of a string in PowerShell? Then the Trim function in PowerShell is what you are looking for. With the Trim ... Read moreHow to Trim a string in PowerShell The post How to Trim a string in PowerShell appeared first on LazyAdmin ..read more
Visit website
How to add a Comment in PowerShell
LazyAdmin | PowerShell
by Rudy Mens
4M ago
When writing code in any language it’s important to add comments. This also applies to your PowerShell scripts. Although they may sometimes be short, adding comments in PowerShell is nevertheless important. Comments not only help others to understand your code, ... Read moreHow to add a Comment in PowerShell The post How to add a Comment in PowerShell appeared first on LazyAdmin ..read more
Visit website

Follow LazyAdmin | PowerShell on FeedSpot

Continue with Google
Continue with Apple
OR