PowerShell

“PowerShell is such a great product because I’m a deeply-flawed human.” – Snover

 

Recommended Books

 

  

Check out this book for PS7: PowerShell 7 for IT Professionals

 

Just starting out in PowerShell?

 

Read this: Learn PowerShell Scripting in a Month of Lunches, by Don Jones & Jeffery Hicks

 

Resources

 

Official PowerShell Documentation (Microsoft) (website)  [free]

What’s new in PowerShell 7.5  [free]

PowerShell Releases on github (Microsoft)  [free]

PowerShell on reddit (website)  [free]

PowerShell on stackoverflow (website)  [free]

PowerShell Tips on twitter (website)  [free]

PowerShell on Linux

PowerShell on macOS

My PowerShell Vault (1,787 scripts I have collected)  [free]

PowerShell Notes for Professionals (PDF)  [free]

PowerShell MITRE ATT&CK  [free]

Windows PowerShell Basics (Microsoft) (course)  [free]

Learning Path: PowerShell: Getting Started with PowerShell 6 (course)  [paid]

PowerShell version 5.1 and 6: Step-by-Step (course)  [paid]

Getting Started with Microsoft PowerShell (Microsoft) (training)  [free]

PowerShell.org (website)  [free] [excellent]

Getting Started With Microsoft PowerShell (University of Edinburgh) (PDF)  [free]

PowerShell 3.0 ISE Cheat Sheet (Microsoft) (PDF)  [free]

PowerShell Tutorial Online (website)  [free]

PowerShell (TutorialsPoint) (website)  [free]

PowerShell shopping (amazon) (website)

————————————————————

You Try

Get-Command | Out-File output.txt | notepad output.txt
Get-Module -ListAvailable | Out-File output.txt | notepad output.txt
Get-Command -Module NetAdapter | Out-File output.txt | notepad output.txt
Find-Module | Out-File output.txt | notepad output.txt
$PSVersionTable

————————————————————

 

Posts


PowerShell – Return User SIDs from HKEY_USERS
PowerShell – Return BitLocker Passwords using Pattern Matching
PowerShell – Detect AzureAD Device
PowerShell – Detect AzureAD Device or Azure VDI
PowerShell – QUIC Protocol – Security Concerns – Disable
PowerShell – Uninstall Microsoft Edge Browser
PowerShell – Detect User in Local Admin Group
PowerShell – Uninstall Microsoft Teams
PowerShell – Return Current User from QUser
PowerShell – Change Base Priority of Process
PowerShell – Empty Reboot
PowerShell – Return BitLocker Data using MSGraph
PowerShell – Return Current User – System Account
PowerShell – Uninstall Silverlight (or other Apps)
Azure – AVD – Nerdio – Add AD Group to Host Session
PowerShell – Detect if Administrator
PowerShell – Add DNS Suffix to Ethernet Connections
PowerShell – Scan Text File for String
PowerShell – Enabling All Notifications (Azure and Desktops)
PowerShell – Delete Empty Lines in Text File
PowerShell – Dynamically Return Directory Name
PowerShell – Delete String Containing Brackets
PowerShell – Create Restore Point
Active Directory – PowerShell – Return User, Username, Email Address
App Attach – Create Shortcut
AVD – Acrobat 2020 – App Attach Testing
Azure – AVD – PowerShell – Install Zoom Client in Virtual Environment
PowerShell – Time Zone Examples
PowerShell – List BIOS Information
PowerShell – Scheduled Shutdown
PowerShell – Create and Import Self-Signed Certificate
PowerShell – Add ISE Support for PowerShell 7
PowerShell – Create Zip and Backup File
PowerShell – Read Text File from Bottom to Top
PowerShell – Automate Cleanmgr.exe
PowerShell – Verify OneDrive is Installed
PowerShell – Sandbox Testing App Attach – No WVD Required
PowerShell – Return Current User
PowerShell – Search Start Menu for String

PowerShell – Show Time Zone Info
PowerShell – Speech Synthesizer
PowerShell – Remove Built-in Administrator Account
PowerShell – Autopilot – Return HWID
PowerShell – Hide Console
PowerShell – Remove Certificate
PowerShell – Convert to EXE Files with GUI
PowerShell – Return All Shortcuts
PowerShell – Counter
PowerShell – Play Alert or Sound
PowerShell – Focus this Window or Process
PowerShell – Generate Script – Run Script – Use Toasts v1
PowerShell – Return Machines Based Upon Logon Count
PowerShell – Run Scheduled Task Once and Delete
PowerShell – Log Off and Shutdown

PowerShell – Form – Adding Tabs to a Form
PowerShell – Form – Detect Autoscaling
PowerShell – Form – Set DPI Aware
PowerShell – Form – Set Autoscale
PowerShell – Form – Countdown
PowerShell – Form – Close Button

PowerShell – Form – Remove/Disable Cancel, Minimize, Maximize
PowerShell – Form – Log Out v1 – 15 Minutes
PowerShell – Form – PING in GUI Window v1
PowerShell – Form – GUI
PowerShell – Form Input Field; GUI
PowerShell – Form Input, Enter, Escape, OK Button
PowerShell – Form – GUI, Labels, Text, Input, Image, Icon

PowerShell DSC – Service Example
PowerShell DSC – Enable Web-Server
PowerShell DSC – Copy Folder, Recursively
PowerShell DSC – File Example
PowerShell DSC – Registry Example

PowerShell – PING Loop – With and Without GridView 
PowerShell – Delete User Account
Microsoft Teams – PowerShell – Disable Auto Start
PowerShell – Adding Registry Keys for Group Policy

Azure – PowerShell – Device User and Owner
Azure – PowerShell – Create a VM
Azure – PowerShell – Import BitLocker

Azure – PowerShell – Install AzureAD Cmdlets
Azure – PowerShell – Connect to Azure
Azure – PowerShell – Show All Devices
Azure – PowerShell – Show Specific Device
Azure – PowerShell – Show All Users
Azure – PowerShell – Show Specific User
Azure – PowerShell – Remove Device
Azure – PowerShell – Remove Registered Owner
Azure – PowerShell – Add Registered Owner
Azure – PowerShell – Add Registered User
Azure – PowerShell – Update Device Registered User
Azure – PowerShell – Add User into Local Administrators Group

Intune – PowerShell – Add Screensaver Config
Intune – SCCM – PowerShell – Change Time Zone
Intune – PowerShell – Forcing Device Sync
PowerShell – Detect User in Local Admin Group (As a platform script)

SCCM – PowerShell – Return Current User
SCCM – PowerShell – Verify that clients can contact Configuration Manager
SCCM – PowerShell – Return Device Name using ResourceID
SCCM – PowerShell – Return Domain using ResourceID
SCCM – PowerShell – Change Site Code
SCCM – PowerShell – SQL Query
SCCM – PowerShell, VBScript – Name Computer in Task Sequence
SCCM – PowerShell – Remove Reg Keys on Remote Computers
SCCM – PowerShell WMI for the SMS_R_System Class
SCCM – PowerShell – Set up Local Accounts
SCCM – PowerShell – Modify ADR’s Deadline Time

PowerShell – Return Environment Variables
PowerShell – Encrypt and Decrypt using SecureString
PowerShell – Check Temperature of CPU
PowerShell – Download Specific Type of Files
Windows 10 – PowerShell – 1809-1903 – Install RSAT
Google Drive File Stream – PowerShell – Uninstaller
Junos Pulse – PowerShell – Uninstaller
PowerShell – Return AD Users and Last OU
PowerShell – Create AD Group and Mirror Members
PowerShell – Active Directory Cmdlets
PowerShell – Hyper-V Cmdlets
Hyper-V – PowerShell – Create VM
PowerShell – Remove Lines Matching String
PowerShell – Random Fun
PowerShell – Countdown Timer
PowerShell – Show Startup Commands
PowerShell – Cycle through Usernames or User SIDs
PowerShell – Convert Docx Files to PDF
PowerShell – Download and Execute File
PowerShell – Encoded Commands
PowerShell – Base64 Encode/Decode
PowerShell – Delete Temps on Computer
PowerShell – Add Shortcut to Start Menu
PowerShell – Run Cleanup Manager, Partially Automated
PowerShell – Turn Off Computer Screen
PowerShell – Check VPN Connection, Wait Until Session Has Ended, Upgrade VPN

PowerShell – Check for VPN Connection, Present Splash, Install MSI
PowerShell – Install Patches Remotely
PowerShell – Return Installed Software
PowerShell – Return USB Drive Usage
PowerShell – Return Product Key
PowerShell – Return IP, Subnet, Gateway, and DNS
PowerShell – Test Admin Status of Current User
PowerShell – Export AD Users to CSV
PowerShell – Install AppX via Command Line
PowerShell – Add Reg Info for Tracking Purposes
PowerShell – Balloon Tip – Toast (updated)
PowerShell – Working with JSON

PowerShell – Check Password Complexity
AI – PowerShell – Toying With Removing Hyperlinks (without removing other tags)

PowerShell – Balloon Tip – Toast
AI – PowerShell – Search for Pattern in Multiple Files
PowerShell – Return LastWriteTime Registry Key

PowerShell – Using Sendkeys and Runas.exe
Windows 10 – PowerShell – Disable Cortana
Windows – PowerShell – Return Installed Applications
Windows – PowerShell – Return Computer Status, IP, OS, etc.
Windows – PowerShell – Set Screen Resolution
PowerShell – Set up Hidden/Special Account
PowerShell – Return Installed Windows KBs
PowerShell – View Objects of Processes
PowerShell – Output Local Certificates to File
PowerShell – Verify if Device is Connected
PowerShell – Return Disk Space in Chart/Graph
Windows – PowerShell – Remove Windows Store Apps
Windows – PowerShell – Reset Windows Updates
PowerShell – AutoIt – Set Window Size and Position
PowerShell – Update SQL Record
PowerShell – Return File Names and File Versions
PowerShell – Install Fonts

PowerShell – Disable UAC
PowerShell – Return Installed Applications – To Screen or File
PowerShell – Return Inactive Computer Accounts
PowerShell – Join Multiple Computers to Domain
PowerShell – Returning Time
PowerShell – Backup Product Key
PowerShell – Encoding a Password
PASCAL, C++, JS, PS, C# – Return Prime Numbers
PowerShell – Working with User Accounts
PowerShell – Move/Disable Inactive Computers in AD
PowerShell – Excel Report Multiple Hotfixes & Computers
PowerShell – Excel Report for a Single Hotfix
PowerShell – Return List of Windows Updates from Microsoft
PowerShell – Get-WindowsFeature & Install-WindowsFeature
PowerShell – Return Computer name, Count of Missing Updates, Missing KBs
PowerShell – Return True or False for Certificates
Windows – PowerShell – Enable/Disable SMBv1, SMBv2, SMBv3
PowerShell – Return Product Key
PowerShell – Return Product Key and/or Save to Text File
PowerShell/VBScript – Return Members from AD Group
PowerShell – Is User a Member of a Group
PowerShell – Domain or Workgroup
PowerShell – Determine Domain and Do Something
PowerShell/VBScript – Verify Credentials of Active Directory User
PowerShell/VBScript/Batch – Generate Report of Last Boot Time from Computers.txt
PowerShell – GUI and Package

PowerShell – Install Windows Updates – Suppress Reboots
Batch/PowerShell – Inject Windows Updates into WIM
PowerShell – Return Computers from AD

PowerShell – Write to Computer Object Description
PowerShell – Activate Windows
PowerShell – Speech in a Function – PowerShell
PowerShell – Return PS Version
PowerShell – Write to Computer Object Description
PowerShell – Install Pester and Chocolately
PowerShell – Add New Table into AdventureWorks2016 Database
PowerShell – Add Schema, Add Table into a SQL Test Database
PowerShell – Create SQL Database
PowerShell – Add Entries into SQL Database
PowerShell – List BIOS Settings
PowerShell – Change BIOS Settings
PowerShell – Adding support to Windows PE
Windows 10 – PowerShell – Remove Windows 10 Built-in Apps
Windows 10 – PowerShell – Removing Windows 10 Native Shortcuts
Windows 10 – Custom Start Menu in Windows 10
PowerShell – ByPass Execution Policy
Windows 10 – PowerShell – Cannot Enable PowerShell Scripting
PowerShell – Function Comma List and Text File
PowerShell – Autologin into Windows
PowerShell – Make Your Scripts Speak – Talk
PowerShell – Take Snapshot of Screen
PowerShell – Return Logged on User
PowerShell – Playing Music

PowerShell – Quickly Disable Network Cards
PowerShell – Copy a File
PowerShell – Office 2016 Script
PowerShell – Simple Hash Table
PowerShell – Acrobat Reader Silent Install
PowerShell – VLC Player Silent Install
PowerShell – Archive Users Not Logged in 90 Days

PowerShell – Archiving Disabled Users Home Directories
PowerShell – Count Users in AD
PowerShell – Return All BitLocker Keys from AD
PowerShell – Active Directory
PowerShell – Pin and Unpin Applications from the Taskbar and Start-menu
PowerShell – Return Username on Remote Machine

PowerShell – Launching Commands on Behalf of Someone Else
PowerShell – Count Files
PowerShell – Bulk Create Users from CSV
PowerShell – Write Event Log Using PowerShell
PowerShell – Create Users in AD

 

  < site index