PowerShell Scripts Dashboard

🌙 Dark
SCRIPT
Cmd
Get-Help
Description
Displays information about PowerShell commands.
PowerShell Script

Get-Help Get-Process
      
SCRIPT
Cmd
Get-Command
Description
Lists all available commands in PowerShell.
PowerShell Script

Get-Command
      
SCRIPT
Cmd
Get-ChildItem
Description
Retrieves files and folders in a specified location.
PowerShell Script

Get-ChildItem C:\
      
SCRIPT
Cmd
Set-Location
Description
Changes the current working directory.
PowerShell Script

Set-Location D:\
      
SCRIPT
Cmd
Get-Content
Description
Reads the content of a file.
PowerShell Script

Get-Content file.txt
      
SCRIPT
Cmd
Out-File
Description
Writes output to a file.
PowerShell Script

Get-Process | Out-File processes.txt
      
SCRIPT
Cmd
Write-Output
Description
Sends output to the pipeline.
PowerShell Script

Write-Output “Hello, PowerShell!”
      
SCRIPT
Cmd
Select-Object
Description
Selects specific properties of objects.
PowerShell Script

Get-Process | Select-Object Name, CPU
      
SCRIPT
Cmd
Where-Object
Description
Filters objects based on specified criteria.
PowerShell Script

Get-Service | Where-Object { $_.Status -eq “Running” }
      
SCRIPT
Cmd
ForEach-Object
Description
Performs an operation on each object in a pipeline.
PowerShell Script

1..5 | ForEach-Object { $_ * 2 }
      
SCRIPT
Cmd
Format-Table
Description
Formats output as a table.
PowerShell Script

Get-Process | Format-Table -AutoSize
      
SCRIPT
Cmd
Sort-Object
Description
Sorts objects by specified properties.
PowerShell Script

Get-Service | Sort-Object Status
      
SCRIPT
Cmd
Measure-Object
Description
Calculates properties of objects (e.g., length).
PowerShell Script

“Hello, PowerShell!” | Measure-Object -Character
      
SCRIPT
Cmd
New-Item
Description
Creates a new item (file, folder, etc.).
PowerShell Script

New-Item newfile.txt -ItemType File
      
SCRIPT
Cmd
Remove-Item
Description
Deletes an item.
PowerShell Script

Remove-Item file.txt
      
SCRIPT
Cmd
Copy-Item
Description
Copies files or folders.
PowerShell Script

Copy-Item file.txt newfolder
      
SCRIPT
Cmd
Rename-Item
Description
Renames an item.
PowerShell Script

Rename-Item file.txt newname.txt
      
SCRIPT
Cmd
Test-Path
Description
Checks if a file or folder exists.
PowerShell Script

Test-Path file.txt
      
SCRIPT
Cmd
Get-Service
Description
Retrieves services.
PowerShell Script

Get-Service
      
SCRIPT
Cmd
Start-Service
Description
Starts a service.
PowerShell Script

Start-Service serviceName
      
SCRIPT
Cmd
Stop-Service
Description
Stops a service.
PowerShell Script

Stop-Service serviceName
      
SCRIPT
Cmd
Restart-Service
Description
Restarts a service.
PowerShell Script

Restart-Service serviceName
      
SCRIPT
Cmd
Get-Process
Description
Retrieves processes.
PowerShell Script

Get-Process
      
SCRIPT
Cmd
Start-Process
Description
Starts a process.
PowerShell Script

Start-Process notepad
      
SCRIPT
Cmd
Stop-Process
Description
Stops a process.
PowerShell Script

Stop-Process -Name notepad
      
SCRIPT
Cmd
Get-WmiObject
Description
Retrieves management information using WMI.
PowerShell Script

Get-WmiObject Win32_ComputerSystem
      
SCRIPT
Cmd
Get-EventLog
Description
Retrieves event log data.
PowerShell Script

Get-EventLog -LogName Application
      
SCRIPT
Cmd
Get-Content
Description
Reads the content of a file.
PowerShell Script

Get-Content file.txt
      
SCRIPT
Cmd
Set-Content
Description
Writes content to a file.
PowerShell Script

Set-Content file.txt “New content”
      
SCRIPT
Cmd
Test-Connection
Description
Tests network connectivity.
PowerShell Script

Test-Connection google.com
      
SCRIPT
Cmd
Test-NetConnection
Description
Comprehensive network connectivity test.
PowerShell Script

Test-NetConnection google.com
      
SCRIPT
Cmd
Invoke-WebRequest
Description
Performs HTTP requests.
PowerShell Script

Invoke-WebRequest https://www.example.com
      
SCRIPT
Cmd
ConvertTo-Json
Description
Converts objects to JSON format.
PowerShell Script

Get-Process | ConvertTo-Json
      
SCRIPT
Cmd
ConvertFrom-Json
Description
Converts JSON data to objects.
PowerShell Script

‘{“Name”:”John”,”Age”:30}’ | ConvertFrom-Json
      
SCRIPT
Cmd
Get-Date
Description
Retrieves the current date and time.
PowerShell Script

Get-Date
      
SCRIPT
Cmd
New-Object
Description
Creates a new object.
PowerShell Script

New-Object PSObject
      
SCRIPT
Cmd
Get-Content
Description
Reads the content of a file.
PowerShell Script

Get-Content file.txt
      
SCRIPT
Cmd
Set-Content
Description
Writes content to a file.
PowerShell Script

Set-Content file.txt “New content”
      
SCRIPT
Cmd
Invoke-Expression
Description
Invokes a command or expression as if by typing it.
PowerShell Script

Invoke-Expression ‘Get-Process’
      
SCRIPT
Cmd
Write-Host
Description
Displays messages to the console.
PowerShell Script

Write-Host “Hello, PowerShell!”
      
SCRIPT
Cmd
Out-GridView
Description
Displays data in a graphical table.
PowerShell Script

Get-Process | Out-GridView
      
SCRIPT
Cmd
Out-Printer
Description
Sends output to a printer.
PowerShell Script

Get-Process | Out-Printer
      
SCRIPT
Cmd
Get-Host
Description
Retrieves host information.
PowerShell Script

Get-Host
      
SCRIPT
Cmd
Get-Module
Description
Lists the modules imported into the session.
PowerShell Script

Get-Module
      
SCRIPT
Cmd
Import-Module
Description
Imports a module into the session.
PowerShell Script

Import-Module MyModule
      
SCRIPT
Cmd
Remove-Module
Description
Removes imported modules from the session.
PowerShell Script

Remove-Module MyModule
      
SCRIPT
Cmd
Get-Command
Description
Lists available commands.
PowerShell Script

Get-Command
      
SCRIPT
Cmd
Get-Alias
Description
Lists aliases.
PowerShell Script

Get-Alias
      
SCRIPT
Cmd
Set-Alias
Description
Creates or changes aliases.
PowerShell Script

Set-Alias np Notepad
      
SCRIPT
Cmd
Clear-Host
Description
Clears the console screen.
PowerShell Script

Clear-Host
      
SCRIPT
Cmd
Clear-Content
Description
Clears the content of a file.
PowerShell Script

Clear-Content file.txt
      
SCRIPT
Cmd
Clear-Item
Description
Removes the content of an item.
PowerShell Script

Clear-Item file.txt
      
SCRIPT
Cmd
Clear-Variable
Description
Removes variable values.
PowerShell Script

Clear-Variable varName
      
SCRIPT
Cmd
Clear-RecycleBin
Description
Clears the contents of the Recycle Bin.
PowerShell Script

Clear-RecycleBin
      
SCRIPT
Cmd
Compare-Object
Description
Compares two sets of objects.
PowerShell Script

Compare-Object object1 object2
      
SCRIPT
Cmd
Complete-Transaction
Description
Completes a transaction.
PowerShell Script

Complete-Transaction
      
SCRIPT
Cmd
ConvertFrom-Csv
Description
Converts CSV-formatted data to objects.
PowerShell Script

Get-Content data.csv | ConvertFrom-Csv
      
SCRIPT
Cmd
ConvertTo-Csv
Description
Converts objects to CSV format.
PowerShell Script

Get-Process | ConvertTo-Csv -NoTypeInformation
      
SCRIPT
Cmd
Debug-Process
Description
Debugs a process.
PowerShell Script

Debug-Process -Id processId
      
SCRIPT
Cmd
Disable-PSBreakpoint
Description
Disables breakpoints.
PowerShell Script

Disable-PSBreakpoint -Id breakpointId
      
SCRIPT
Cmd
Enable-PSBreakpoint
Description
Enables breakpoints.
PowerShell Script

Enable-PSBreakpoint -Id breakpointId
      
SCRIPT
Cmd
Exit
Description
Exits the current session.
PowerShell Script

Exit
      
SCRIPT
Cmd
Export-Alias
Description
Exports aliases to a file.
PowerShell Script

Get-Alias | Export-Alias -Path aliases.txt
      
SCRIPT
Cmd
Export-Clixml
Description
Exports objects to an XML file.
PowerShell Script

Get-Process | Export-Clixml process.xml
      
SCRIPT
Cmd
Export-Csv
Description
Exports objects to a CSV file.
PowerShell Script

Get-Process | Export-Csv process.csv
      
SCRIPT
Cmd
ForEach-Object
Description
Iterates through objects in the pipeline.
PowerShell Script

1..5 | ForEach-Object { $_ * 2 }
      
SCRIPT
Cmd
Format-Custom
Description
Formats output using a customized view.
PowerShell Script

Get-Process | Format-Custom
      
SCRIPT
Cmd
Format-Hex
Description
Formats data as hexadecimal values.
PowerShell Script

Format-Hex 123
      
SCRIPT
Cmd
Format-List
Description
Formats output as a list of properties.
PowerShell Script

Get-Process | Format-List
      
SCRIPT
Cmd
Format-Table
Description
Formats output as a table.
PowerShell Script

Get-Process | Format-Table -AutoSize
      
SCRIPT
Cmd
Format-Wide
Description
Formats output as a table with a single wide column.
PowerShell Script

Get-Process | Format-Wide
      
SCRIPT
Cmd
Get-Acl
Description
Retrieves access control lists (ACLs).
PowerShell Script

Get-Acl file.txt
      
SCRIPT
Cmd
Set-Acl
Description
Sets access control lists (ACLs).
PowerShell Script

Set-Acl file.txt -AclObject $aclObj
      
SCRIPT
Cmd
Get-Alias
Description
Gets aliases.
PowerShell Script

Get-Alias
      
SCRIPT
Cmd
Get-AuthenticodeSignature
Description
Retrieves digital signatures.
PowerShell Script

Get-AuthenticodeSignature file.exe
      
SCRIPT
Cmd
Get-ChildItem
Description
Retrieves items in a location.
PowerShell Script

Get-ChildItem C:\
      
SCRIPT
Cmd
Get-Clipboard
Description
Retrieves the current clipboard contents.
PowerShell Script

Get-Clipboard
      
SCRIPT
Cmd
Get-Command
Description
Gets commands.
PowerShell Script

Get-Command
      
SCRIPT
Cmd
Get-ComputerInfo
Description
Retrieves computer information.
PowerShell Script

Get-ComputerInfo
      
SCRIPT
Cmd
Get-Content
Description
Retrieves the content of an item.
PowerShell Script

Get-Content file.txt
      
SCRIPT
Cmd
Get-Credential
Description
Retrieves stored credentials.
PowerShell Script

Get-Credential
      
SCRIPT
Cmd
Get-Culture
Description
Retrieves culture information.
PowerShell Script

Get-Culture
      
SCRIPT
Cmd
Get-Date
Description
Retrieves the current date and time.
PowerShell Script

Get-Date
      
SCRIPT
Cmd
Get-Event
Description
Retrieves events.
PowerShell Script

Get-Event
      
SCRIPT
Cmd
Get-History
Description
Retrieves the command history.
PowerShell Script

Get-History
      
SCRIPT
Cmd
Get-Host
Description
Retrieves host information.
PowerShell Script

Get-Host
      
SCRIPT
Cmd
Get-HotFix
Description
Retrieves installed hotfixes.
PowerShell Script

Get-HotFix
      
SCRIPT
Cmd
Get-Item
Description
Retrieves items.
PowerShell Script

Get-Item
      
SCRIPT
Cmd
Get-ItemProperty
Description
Retrieves property values of an item.
PowerShell Script

Get-ItemProperty file.txt -Name Length
      
SCRIPT
Cmd
Get-Job
Description
Retrieves background jobs.
PowerShell Script

Get-Job
      
SCRIPT
Cmd
Get-Location
Description
Retrieves the current location.
PowerShell Script

Get-Location
      
SCRIPT
Cmd
Get-Member
Description
Retrieves members of an object.
PowerShell Script

Get-Process | Get-Member
      
SCRIPT
Cmd
Get-Module
Description
Lists the modules imported into the session.
PowerShell Script

Get-Module
      
SCRIPT
Cmd
Get-OSVersion
Description
Retrieves the operating system version.
PowerShell Script

Get-WmiObject Win32_OperatingSystem | Select-Object Caption
      
SCRIPT
Cmd
Get-Process
Description
Retrieves processes.
PowerShell Script

Get-Process
      
SCRIPT
Cmd
Get-Random
Description
Generates random numbers.
PowerShell Script

Get-Random -Minimum 1 -Maximum 100
      
SCRIPT
Cmd
Get-Service
Description
Retrieves services.
PowerShell Script

Get-Service
      
SCRIPT
Cmd
Get-Transaction
Description
Retrieves transactions.
PowerShell Script

Get-Transaction
      
SCRIPT
Cmd
Get-UICulture
Description
Retrieves user interface culture information.
PowerShell Script

Get-UICulture
      
SCRIPT
Cmd
Get-Unique
Description
Retrieves unique items.
PowerShell Script

Get-ChildItem | Get-Unique
      
SCRIPT
Cmd
Start-Transcript
Description
Start a transcript file with default settings
PowerShell Script

Start-Transcript
      
SCRIPT
Cmd
Start-Transcript
Description
Start a transcript file at a specific location
PowerShell Script

Start-Transcript -Path "C:\transcripts\transcript0.txt" -NoClobber
      
SCRIPT
Cmd
Start-Transcript
Description
Start a transcript file with a unique name and store it on a file share
PowerShell Script

$sharepath  = '\\Server01\Transcripts'
$username   = $env:USERNAME
$hostname   = hostname
$version    = $PSVersionTable.PSVersion.ToString()
$datetime   = Get-Date -f 'yyyyMMddHHmmss'
$filename   = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
Start-Transcript
      
SCRIPT
Cmd
Stop-Transcript
Description
To stop a transcript, use the Stop-Transcript cmdlet.
PowerShell Script

#STOP THE RUNNING SCRIPT
Stop-Transcript

Notes
To stop a transcript, use the Stop-Transcript cmdlet.

To record an entire session, add the Start-Transcript command to your profile. For more information, see about_Profiles.
      
SCRIPT
Cmd
ForEach cmd
Description
For example, the foreach loop in the following example displays the values in the $letterArray array.
PowerShell Script

$letterArray = 'a','b','c','d'
foreach ($letter in $letterArray)
{
  Write-Host $letter
}
      
SCRIPT
Cmd
ForEach cmd
Description
You can also use foreach statements with cmdlets that return a collection of items. In the following example, the foreach statement steps through the list of items returned by the Get-ChildItem cmdlet.
PowerShell Script

foreach ($file in Get-ChildItem)
{
  Write-Host $file
}
      
SCRIPT
Cmd
ForEach cmd
Description
You can refine the example using an if statement to limit the results that are returned. In the following example, the if statement limits the results to files that are greater than 100 kilobytes (KB):
PowerShell Script

foreach ($file in Get-ChildItem)
{
  if ($file.Length -gt 100KB)
  {
    Write-Host $file
  }
}
      
SCRIPT
Cmd
ForEach cmd
Description
In this example, the foreach loop uses a property of the $file variable to perform a comparison operation ($file.length -gt 100KB). The $file variable has all the properties of the object returned by the Get-ChildItem. In the next example, the script displays the length and the last access time inside the statement list:
PowerShell Script

foreach ($file in Get-ChildItem)
{
  if ($file.Length -gt 100KB)
  {
    Write-Host $file
    Write-Host $file.Length
    Write-Host $file.LastAccessTime
  }
}
      
SCRIPT
Cmd
ForEach cmd
Description
You can also use variables from outside a foreach loop. The following example counts files over 100 KB in size:
PowerShell Script

$i = 0
foreach ($file in Get-ChildItem) {
  if ($file.length -gt 100KB) {
    Write-Host $file 'file size:' ($file.length / 1024).ToString('F0') KB
    $i = $i + 1
  }
}

if ($i -ne 0) {
  Write-Host
  Write-Host $i ' file(s) over 100KB in the current directory.'
}
else {
  Write-Host 'No files greater than 100KB in the current directory.'
}
      
SCRIPT
Cmd
Get-ItemProperty
Description
Example 4: Change the value of a Registry key
PowerShell Script

Get-ItemProperty -Path HKCU:\Network\* |
  ForEach-Object {
    Set-ItemProperty -Path $_.PSPath -Name RemotePath -Value $_.RemotePath.ToUpper()
  }
      
SCRIPT
Cmd
Get SID of Profile from Registry
Description
Get SID
PowerShell Script

$nameSID = Get-ADUser -Identity 'E0507454' | select SID
Write-Host $nameSID 
      
SCRIPT
Cmd
Installing PowerShell on Windows 10
Description
Install the PowerShell Active Directory Module
PowerShell Script

Get-WindowsCapability -Name RSAT.ActiveDirectory* -Online | Add-WindowsCapability -Online
      
SCRIPT
Cmd
Get-CimInstance
Description
DISPLAY ALL USER FOLDERS ONLY
PowerShell Script

>>>>>>>>>>>>>>>>>>>>>>>>DISPLAY ALL USER FOLDERS ONLY
Get-CimInstance -ClassName Win32_UserProfile -Filter 'Special="False"' | where {$_.LocalPath -ne $null -and $_.localPath -notlike "C:\windows\*"} | foreach {$_.localpath.replace('C:\Users\','')}
>>>>>>>>>>>>>>>>>>>>>>>>DISPLAY ALL USER FOLDERS ONLY
      
SCRIPT
Cmd
Get-CimInstance
Description
DISPLAY ALL USER FOLDERS AND SERVICES
PowerShell Script

>>>>>>>>>>>>>>>>>>>>>>>>DISPLAY ALL USER FOLDERS AND SERVICES
$computerName = $env:COMPUTERNAME

# Get local user profiles
$localProfiles = Get-ChildItem "C:\Users\" | Where-Object {$_.PSIsContainer} | Select-Object -ExpandProperty Name

# Get domain user profiles
$domainProfiles = (Get-WmiObject -Class Win32_UserProfile -ComputerName $computerName).LocalPath.Replace("C:\Users\", "") | Select-Object -Unique

# Combine local and domain user profiles
$userProfiles = $localProfiles + $domainProfiles

# Output the list of user profiles
$userProfiles
>>>>>>>>>>>>>>>>>>>>>>>>DISPLAY ALL USER FOLDERS AND SERVICES
      
SCRIPT
Cmd
CTRL+C OR CTRL+BREAK
Description
STOP A RUNNINNG POWERSHELL SCRIPT
PowerShell Script

CTRL+C
      
SCRIPT
Cmd
Get-LocalUser
Description
Find SID of All Users using "Get-LocalUser" PowerShell command
PowerShell Script

Get-LocalUser | Select-Object -Property @('Name', 'SID')
      
SCRIPT
Cmd
GetCurrent()
Description
Find SID of Users in Registry Editor
PowerShell Script

[Security.Principal.WindowsIdentity]::GetCurrent() | Select-Object -Property @('Name', 'User')
      
SCRIPT
Cmd
Get-LocalUser
Description
Find SID of All Users using "Get-LocalUser" PowerShell command
PowerShell Script

Get-LocalUser | Select-Object -Property @('Name', 'SID')
      
SCRIPT
Cmd
Start-Transcript / Stop-Transcript
Description
The best all-around way to create logs of scripts
PowerShell Script

Start-Transcript -Path "transcript.log"
# your code here
Stop-Transcript
      
SCRIPT
Cmd
Clear-RecycleBin -Force Clear-RecycleBin -DriveLetter C Clear-RecycleBin
Description
Clear all recycle bins Clear a specified recycle bin Clear all recycle bins without confirmation
PowerShell Script

Clear-RecycleBin -Force
Clear-RecycleBin -DriveLetter C
Clear-RecycleBin
 -Confirm:$false.2121221222121
      
SCRIPT
Cmd
Get Computer Serial Number
Description
Get Current machine Serial Number
PowerShell Script

Get-WmiObject win32_bios | select Serialnumber
      
SCRIPT
Cmd
Get Remote Computer Serial Number
Description
PowerShell Script


      
SCRIPT
Cmd
Query a Specific OU
Description
Query a Specific OU and export Computer Names to a Text File
PowerShell Script

#PowerShell Script to Query a Specific OU and export Computer Names to a Text File: 
#$OU = "OU=AMER,OU=ZZ MDM, DC=pharma,DC=aventis,DC=com"  # Replace with your OU > WORX
$OU = "OU=Office,OU=MDM IA,OU=ZZ MDM, DC=pharma,DC=aventis,DC=com"  # Replace with your OU > WORX
$OutputFile = "C:\TEMP\ComputerNames.txt"
$computers = Get-ADComputer -SearchBase $OU -Filter *
$computers | Select-Object -ExpandProperty Name | Out-File $OutputFile
      
SCRIPT
Cmd
Get Services
Description
Get the services on a remote computer
PowerShell Script

Get-WmiObject Win32_Service -Credential FABRIKAM\administrator -ComputerName Fabrikam
      
SCRIPT
Cmd
Get Bios
Description
Get the BIOS on the local computer
PowerShell Script

Get-WmiObject -Class Win32_Bios | Format-List -Property *
      
SCRIPT
Cmd
Get-ItemProperty
Description
List ALL apps displayed in the control panels add remove programs dialog
PowerShell Script

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
Format-Table -AutoSize
      
SCRIPT
Cmd
Get-WinEvent -FilterHashtable
Description
Display who restored a PC from AD
PowerShell Script

# Define the time range to search
$StartTime = (Get-Date).AddDays(-7)  # Adjust as needed
$EndTime = Get-Date

# Define the computer name (Distinguished Name or part of it)
$RestoredComputerName = "CN=PCNAME"  # Replace with actual name

# Search the Security log for Event ID 5136
Get-WinEvent -FilterHashtable @{
    LogName = 'Security'
    ID = 5136
    StartTime = $StartTime
    EndTime = $EndTime
} | ForEach-Object {
    $xml = [xml]$_.ToXml()
    $objectDN = $xml.Event.EventData.Data | Where-Object { $_.Name -eq "ObjectDN" } | Select-Object -ExpandProperty '#text'
    $attribute = $xml.Event.EventData.Data | Where-Object { $_.Name -eq "AttributeLDAPDisplayName" } | Select-Object -ExpandProperty '#text'
    $newValue = $xml.Event.EventData.Data | Where-Object { $_.Name -eq "AttributeValue" } | Select-Object -ExpandProperty '#text'

    if ($objectDN -like "*$RestoredComputerName*" -and $attribute -eq "isDeleted" -and $newValue -eq "FALSE") {
        [PSCustomObject]@{
            TimeCreated = $_.TimeCreated
            RestoredBy  = $_.Properties[1].Value  # SubjectUserName
            ObjectDN    = $objectDN
        }
    }
}
      
SCRIPT
Cmd
Get-ChildItem
Description
lists all files and folders in a specified directory
PowerShell Script

# Set the directory path
$directoryPath = "C:\Your\Target\Directory"

# Set the output file path
$outputFile = "C:\Your\Output\file_fldr_list.txt"

# Get list of files and folders
Get-ChildItem -Path $directoryPath -Recurse | 
    Select-Object FullName |
    Out-File -FilePath $outputFile -Encoding UTF8

Write-Host "File and folder list saved to $outputFile"

# 1) Replace C:\Your\Target\Directory with the path of the directory you want to scan.
# 2) Replace C:\Your\Output\file_list.txt with the desired output file path.
      
SCRIPT
Cmd
Get Installed Apps
Description
LIST ALL PROGRAMS INSTALLED ON A PC
PowerShell Script

# Define output file paths
$fullListPath = "$env:USERPROFILE\Desktop\InstalledApps_FullList.txt"
$filteredListPath = "$env:USERPROFILE\Desktop\InstalledApps_FilteredList.txt"

# Define common apps to exclude (customize this list as needed)
$commonApps = @(
    "Microsoft Edge",
    "Microsoft OneDrive",
    "Microsoft Office",
    "Microsoft Teams",
    "Visual C++",
    "Skype",
    "Windows Terminal",
    "PowerShell",
    "Adobe Acrobat Reader",
    "Zoom",
    "Google Chrome",
    "Mozilla Firefox"
)

# Get installed apps from registry (32-bit and 64-bit)
$installedApps = @()
$registryPaths = @(
    "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
    "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*",
    "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
)

foreach ($path in $registryPaths) {
    $installedApps += Get-ItemProperty $path -ErrorAction SilentlyContinue |
        Where-Object { $_.DisplayName } |
        Select-Object DisplayName, DisplayVersion, Publisher
}

# Save full list to file
$installedApps | Sort-Object DisplayName | Format-Table -AutoSize | Out-File $fullListPath

# Filter out common apps
$filteredApps = $installedApps | Where-Object {
    $appName = $_.DisplayName
    $isCommon = $false
    foreach ($common in $commonApps) {
        if ($appName -like "*$common*") {
            $isCommon = $true
            break
        }
    }
    -not $isCommon
}

# Save filtered list to file
$filteredApps | Sort-Object DisplayName | Format-Table -AutoSize | Out-File $filteredListPath

# Output summary
Write-Host "✅ Full list saved to: $fullListPath"
Write-Host "✅ Filtered list saved to: $filteredListPath"
      
SCRIPT
Cmd
Get Installed Certificates for PC
Description
Create list of PC Certificates
PowerShell Script


# Ensure the output folder exists
$OutputPath = "C:\temp\MyPC_Certs.txt"
if (!(Test-Path "C:\temp")) {
    New-Item -ItemType Directory -Path "C:\temp"
}

# Get all certificates from Local Machine store
$certs = Get-ChildItem -Path Cert:\LocalMachine\My

# Write details to file
$certs | ForEach-Object {
    "Subject: $($_.Subject)" +
    "`nIssuer: $($_.Issuer)" +
    "`nThumbprint: $($_.Thumbprint)" +
    "`nNotBefore: $($_.NotBefore)" +
    "`nNotAfter: $($_.NotAfter)" +
    "`n----------------------------------------"
} | Out-File -FilePath $OutputPath -Encoding UTF8

Write-Host "Certificate details saved to $OutputPath"
      
SCRIPT
Cmd
Get Installed Certificates for PC w/Date
Description
Create list of PC Certificates with Approx Install Date
PowerShell Script


# Ensure output folder exists
$OutputPath = "C:\temp\MyPC_Certs.txt"
if (!(Test-Path "C:\temp")) {
    New-Item -ItemType Directory -Path "C:\temp"
}

# Get all certificates from Local Machine store
$certs = Get-ChildItem -Path Cert:\LocalMachine\My

# Write details to file
$certs | ForEach-Object {
    "Subject: $($_.Subject)" +
    "`nIssuer: $($_.Issuer)" +
    "`nThumbprint: $($_.Thumbprint)" +
    "`nInstallDate (approx): $($_.NotBefore)" +
    "`nExpires: $($_.NotAfter)" +
    "`n----------------------------------------"
} | Out-File -FilePath $OutputPath -Encoding UTF8

Write-Host "Certificate details saved to $OutputPath"
      
SCRIPT
Cmd
Print Screen from PS
Description
Perform a Screen Print from PowerShell
PowerShell Script

Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

# Create output folder if it doesn't exist
$folder = "C:\Temp"
if (!(Test-Path $folder)) { New-Item -ItemType Directory -Path $folder | Out-Null }

# Capture the primary screen
$bounds = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$bitmap = New-Object System.Drawing.Bitmap($bounds.Width, $bounds.Height)
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)

# Copy screen into bitmap
$graphics.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)

# Save as JPG
$path = "\\swtflsusswtdep1\is2000\DEPLOY\SCREEN PRINTS\COMPLIANCE_APP\scrprint.jpg"
$bitmap.Save($path, [System.Drawing.Imaging.ImageFormat]::Jpeg)

# Clean up
$graphics.Dispose()
$bitmap.Dispose()

Write-Host "Screen print saved to $path"
      
SCRIPT
Cmd
Find and List Files & Folders
Description
list of all files in a folder
PowerShell Script

Get-ChildItem "C:\Path\To\Folder" -File |
Select-Object Name |
Out-File "C:\Path\To\filelist.txt"
      
SCRIPT
Cmd
Find and List Files & Folders - Include subfolders
Description
list of all files in a folder
PowerShell Script

Get-ChildItem "C:\Path\To\Folder" -File -Recurse |
Select-Object FullName |
Out-File "C:\Path\To\filelist.txt"
      
SCRIPT
Cmd
Find and List Files & Folders - Names + size + last modified date
Description
list of all files in a folder
PowerShell Script


Get-ChildItem "C:\Path\To\Folder" -File |
Select-Object Name, Length, LastWriteTime |
Out-File "C:\Path\To\filelist.txt"

      
SCRIPT
Cmd
Find and List Files & Folders - Folder structure only (no files)
Description
list of all files in a folder
PowerShell Script



Get-ChildItem "C:\Path\To\Folder" -Directory -Recurse |
Select-Object FullName |
Out-File "C:\Path\To\folderlist.txt"


      
SCRIPT
Cmd
Restart Windows In Safe Mode
Description
Reboot PC from PowerShell into Safe Mode
PowerShell Script

must be run from > C:\Windows\System32
bcdedit /set {current} safeboot minimal Restart-Computer
SCRIPT - Next Example
Cmd
Cmd Name Here
Description
Your Description Here
PowerShell Script

Your Script Goes Here