PowerShell – Telegram
PowerShell
821 subscribers
214 photos
4 videos
1 file
802 links
Task automation and configuration management framework #PowerShell
Download Telegram
📌 v7.1.3 Release of PowerShell

Engine Updates and Fixes:
- Remove the 32K character limit on the environment block for Start-Process
- Fix webcmdlets to properly construct URI from body when using -NoProxy

General Cmdlet Updates and Fixes
- Fix PromptForCredential() to add targetName as domain

Build and Packaging Improvements
- Bump .NET SDK to 5.0.4
📌 SANS 3-part series: PowerShell for Audit, Compliance and Security Automation and Visualization

In this session, we will cover the basics of using PowerShell for common infosec, compliance and audit tasks. We will make heavy use of demonstrations to explore the object-oriented nature of the shell, important commands for getting help, and how to select, sort, filter and transform results from native Windows tools.

Part 1. The PowerShell Tools I Use for Audit and Compliance Measurement

Part 2. Using the VMWare PowerCLI modules to Measure VMWare Compliance

Part 3. Accessing Web APIs with PowerShell
💡 v7.2.0-preview.4 Release of PowerShell

- Fix Get-Date -UFormat%G and %g behavior.
- Update engine noscript signature validation to match Get-AuthenticodeSignature logic.
- Avoid array allocations from GetDirectories and GetFiles
- Add UseOSCIndicator setting to enable progress indicator in terminal
- Re-enable VT mode on Windows after running command in ConsoleHost
- Fix Move-Item for FileSystemProvider to use copy-delete instead of move for DFS paths
- Fix PromptForCredential() to add targetName as domain
- Update Concise ErrorView to not show line information for errors from noscript module functions
- Remove the 32,767 character limit on the environment block for Start-Process
- Don't write possible secrets to verbose stream for web cmdlets
- Update .NET to version 6.0.100-preview.2.21155.3
📘 PowerShell Variable Scope Guide: Using Scope in Scripts and Modules.

PowerShell scope protects variables and other artifacts by limiting where they can be read and modified. Scope levels protect items that should not be changed.

https://www.varonis.com/blog/powershell-variable-scope/?utm_source=dlvr.it&utm_medium=twitter
📌 PowerShell File Checksum Integrity Verifier (PsFCIV) is now a separate package.

The module replaces and enhances discontinued Microsoft's File Checksum Integrity Verifier (FCIV) which is intended to monitor file share integrity.

https://www.pkisolutions.com/powershell-file-checksum-integrity-verifier-psfciv/
Use PowerShell properly!
📦 A lightweight wrapper module for handling mutexes in PowerShell

The Mutex module is designed as a minimal wrapper around the .NET mutex functionality. It is designed to synchronize resource access across process boundaries within the same host.
Are plainly put, it is used to prevent access conflicts. For examples from writing to the same file.

https://github.com/friedrichweinmann/mutex
This is a valid PowerShell code that runs.
Do you know what "a" will be?
📦 v7.2.0-preview.5 Release of PowerShell.

Breaking Changes
- Make PowerShell Linux deb and RPM packages universal
- Enforce AppLocker Deny configuration before Execution Policy Bypass configuration
- Disallow mixed dash and slash in command line parameter prefix
Experimental Features
- PSNativeCommandArgumentPassing: Use ArgumentList for native executable invocation (breaking change)
Engine Updates and Fixes
General Cmdlet Updates and Fixes
📌 A PowerShell users' guide to regular expressions: part 1 and part 2 (of 3).

Even experts can be a little intimidated by reading through a noscript and meeting something like
^\{?[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}\}?$

So here is piece of good news - It won’t take much longer to understand that monster. Let’s start at the beginning.

https://jhoneill.github.io/powershell/2021/04/10/regex1.html

https://jhoneill.github.io/powershell/2021/04/11/regex2.html
🎬 PowerShell Testing with Pester 5

0:00​ Intro
2:28​ About Jakub Jares
3:15​ Install Pester
4:46​ Overview of Pester
13:32​ Practical Example
34:38​ Pester VSCode Extension
37:22​ Debugging in VSCode with Pester
43:24​ Practical Example
1:07:00​ Test Drive
1:16:00​ Other Features
1:34:00​ VS Code Code Coverage
1:49:00​ Q&A

https://www.youtube.com/watch?v=qeiy8fRMHf8
Inline values for PowerShell variables

This extension enables inline values for variables when debugging a PowerShell noscript.