PowerShell – Telegram
PowerShell
820 subscribers
214 photos
4 videos
1 file
802 links
Task automation and configuration management framework #PowerShell
Download Telegram
Format time and date output of PowerShell New-TimeSpan
By: Emanuel Halapciuc

My function, Get-TimespanPretty, allows you to view the time span-the difference between two time points or dates-in a compact, user-friendly format. It is built on top of the New-TimeSpan cmdlet, which offers details as output that you usually need. With Get-TimespanPretty, you can simply pipe the output (TimeSpan object) of New-TimeSpan or Measure-Command to Get-TimespanPretty. It's easy to use, and there's no need for complex reworking of noscripts that may include such commands.
Link
🔥1
Today's cmdlet ‣ Get-Alias
Gets the aliases for the current session.

Example's Remarks:
• This example gets aliases for commands that have names that end in "-PSSession", except for those that begin with "e".

#tutorial
Using PowerShell on chromeOS Flex
By: Harm Veenstra

On an older laptop, I use chromeOS Flex. Easy to install, and for simple web browsing, it's a perfect solution without any license requirement. But yeah... I also wanted to use PowerShell on that, this blog post will show you how to install and use PowerShell on chromeOS Flex.
Link
Today's tip ‣ Arrays: Arrays as reference types

”As array types are reference types, a variable designating an array can be made to refer to any array of any rank, length, and element type.”
$a = 10,20 # $a refers to an array of length 2
$a = 10,20,30 # $a refers to a different array, of length 3
$a = "red",10.6 # $a refers to a different array, of length 2
$a = New-Object 'int[,]' 2,3 # $a refers to an array of rank 2

#tip
AzExpression 0.2.0
By: Simon Wahlin

Small module with functions that let you run Azure ARM template functions from PowerShell
Link
Today's cmdlet ‣ Get-Alias
Gets the aliases for the current session.

Example's Remarks:
• This command gets the aliases for the `Get-ChildItem` cmdlet.

#tutorial
How do you schedule your PS noscripts?
By: u/Distinct_Ship_3152

Im with two small IT help desk/ ops teams located in two different manufacturing plants.
Link
How to add BGP routes to AWS security groups
By: Alex Neihaus

PowerShell's Compare-Object makes it easy to compare two collections of objects
Link
Today's cmdlet ‣ Get-WinEvent
Gets events from event logs and event tracing log files on local and remote computers.

Example's Remarks:
• In this example, `Get-WinEvent` gets all events from the Application log for the last two days except those that have a Level of 4 (Information).

#tutorial
👍1
PowerShell SnippetRace 44/45-2022
By: Roman Stadlmair

PSScriptAnalyzer, OpenSSH, curl, -ne, Azure Automation Events PowerShell Workshop (MS-Graph, PowerShellGet, news around PS), 9. November 2022 in Linz. Workshop will be held in GERMAN language.
Link
Practicing PowerShell
By: u/Ckn0wt

Hi everyone. What would be the most cost effective option/service I could use to spin up a few servers so I can build out a test AD environment to effectively practice PowerShell?
Link
👍1
PowerShell Community Textbook Update
By: u/PowerShellMichael

Gday everyone! I'm really sorry about the delay with the release of the paper-back editions. We are having amazon issues. At the moment I'm exploring other options to get a paperback so I can conduct a final review.
Link
Cool features in Visual Studio 2022
By: Mads Kristensen

A few weeks ago, I gave a presentation at a conference about cool new features in Visual Studio 2022. It was a pre-recorded presentation, so I was able to do final edits to the video before sending it to the conference organizers.
Link
10 Best Powershell Courses & Tutorials – Learn Powershell Online
By: Coursesity Team

Highly curated best Powershell tutorials for beginners. start with the best Powershell tutorials and learn Powershell as beginners.
Link
👍1
Today's cmdlet ‣ Set-Service
Starts, stops, and suspends a service, and changes its properties.

Example's Remarks:
• `Get-Service` uses the Name parameter to specify the service, Schedule .
• The object is stored in the variable, `$S`.
• `Set-Service` uses the InputObject parameter and specifies the object stored `$S`.
• The Status parameter sets the service to Stopped .

#tutorial
Security of app registration in Azure Active Directory
By: Serkar

Originally, I thought about writing an article about how to get SharePoint list items with Microsoft Graph API by PowerShell. But before doing this, I thought you should first need to know something about app registration in Azure Active Directory in this context. App registrations are really powerful, as you can raise any request if
Link
UserAccountControl attribute: Checking and configuring security settings for Active Directory accounts
By: Wolfgang Sommergut

The UserAccountControl attribute can be used to configure several account settings in Active Directory. This applies, for example, to the expiration date of passwords or to Kerberos delegation. An AD audit should check this attribute regularly. This can be done using PowerShell, and there is a cmdlet for changing flags.
Link
Today's cmdlet ‣ Format-Custom
Uses a customized view to format the output.

Example's Remarks:
• This command formats information about the Winlogon process in an alternate customized view.
• Because the command does not use the View parameter, `Format-Custom` uses a default custom view to format the data.

#tutorial
Working with Different PowerShell Wildcard Expressions
By: Brien Posey

In PowerShell, a wildcard can be used to take the place of one or more characters. This is especially useful when working with variables or when manipulating text strings. In this article, I'll discuss some of the many things that you can do with wildcards in PowerShell.
Link