PowerShell – Telegram
PowerShell
821 subscribers
214 photos
4 videos
1 file
802 links
Task automation and configuration management framework #PowerShell
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
New VMware PowerCLI Home Page

1.   PowerCLI Home Page
2.   Re-organization of cmdlets
3.   Global Search Bar
4.   Data Structure
5.   Categories
6.   CMDLET Reference Page

More details:
https://blogs.vmware.com/PowerCLI/2021/01/introducing-the-new-powercli-home-page.html
📌 Copy request from Chrome network tools as PowerShell

It will produce nice output:

Invoke-WebRequest -Uri "https://www.microsoft.com/" -Headers @{
"method"="GET"
 "authority"="www.microsoft.com"
 "scheme"="https"
 ...
}
PowerShell v7.1.1 now released.

General Cmdlet Updates and Fixes
- Avoid an exception if file system does not support reparse points
- Make AppLocker Enforce mode take precedence over UMCI Audit mode

Code Cleanup
- Fix syntax error in Windows packaging noscript

Build and Packaging Improvements
📌 Index accessors in PowerShell support multi-key access (read-only):

PS > @(1..5)[2,1]
3
2

Same with dictionaries:

PS> @{ A=1; B = 2; C = 3 }[-split 'A C']
1
3
💡 A Powershell Template For Creating The Perfect Function

Powershell Template
Comment Based Help
CmdletBinding and the Param Block
       SupportsShouldProcess
Create Powershell Function Parameters
       How To Use Alias
       How To Use ValidateSet and ValidateRange
       How To Use ValidateScript
       How To Use ParameterSetName
Begin, Process And End Blocks
       Begin and End Blocks
       Process Block

https://thesysadminchannel.com/powershell-template/
Windows Terminal Preview 1.6 Release

- IN PREVIEW TODAY: Terminal now has an optional graphical settings editor! Until it's ready for prime time, it's hidden behind a NON-DEFAULT key binding.
- Terminal now supports "Startup Actions"
- Terminal 1.6 has gained experimental support for HLSL pixel shaders
- We've gained support for application progress reports on OSC 9;4
- Terminal has gained two new visual bell features
- The italic graphic rendition (SGR 3) is now supported
- Terminal has learned a new cursor style: double underscore
- Tabs can now be moved left/right with the keyboard with action binding moveTab

https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-6-release/?WT.mc_id=WDIT-MVP-5002293
💡Reddit: I finished a noscript for work but I'm not comfortable showing it to others, what can I do to make it look professional?
🎁 The Ultimate Guide to Terminal User Interfaces in PowerShell

Why not...

https://blog.ironmansoftware.com/tui-powershell/
📌 First VScode release of the year! Check out what's new
📌 PowerCLI now supports parallel operations on PowerShell foreach-object commands!

Happy to inform you all that foreach-object -Parallel is now supported with PowerCLI. This can be achieved by 2 ways.
- Inline -Server parameter
- Use PowerCLI Context

More details in the announcement:

https://blogs.vmware.com/PowerCLI/2021/02/new-release-vmware-powercli-12-2.html
📘 PowerShell Sleep Duration Accuracy and Windows Timers

TL;DR
When high accuracy is desired, change the timer resolution and use the [System.Threading.Thread]::Sleep()

Long read with lot of details here:

https://xkln.net/blog/powershell-sleep-duration-accuracy-and-windows-timers/
This media is not supported in your browser
VIEW IN TELEGRAM
Just add "1s" after "github" when viewing code on http://github.com and VS Code loads up instantly
PowerShell 7.0.5 , 7.1.2 and 7.2.0-preview.3 are out!
💡 Proposal. Handling Parameter Binding in Native Executables

PowerShell team's making a change on how PowerShell7 passes arguments to native commands to work more predictably.

https://github.com/PowerShell/PowerShell/issues/14747