PowerShell – Telegram
PowerShell
822 subscribers
214 photos
4 videos
1 file
802 links
Task automation and configuration management framework #PowerShell
Download Telegram
💡 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
📌 Supercharge Your Docker Development with VS Code
Secrets Management in PowerShell with Sydney Smith
Richard chats with Sydney Smith who is the product manager for Secrets Management about how this PowerShell extension helps you access and manage multiple key stores in your organization and provides secrets for your PowerShell noscripts.
📌Useful. The Trim method removes from the current string all leading and trailing characters that are in the parameter.

PS C:\> "123abc456xyz789".Trim([char]'0'..[char]'9')
abc456xyz
👍1
💡 Adversary Tactics: PowerShell

SpecterOps offers their retired Adversary Tactics: PowerShell course material online for free (PDF).

- PowerShell Basics Refresher
- PowerShell Remoting
- PowerShell Without PowerShell
- Windows Management Instrumentation (WMI)
- Active Directory
- PowerShell Prevention - Implementation, Auditing, and - Bypasses
- Reflection
- Low-level, Win32 Interop

https://github.com/specterops/at-ps
#course #free