Skip to content

Instantly share code, notes, and snippets.

View PSingletary's full-sized avatar
🔍
Search

PSingletary PSingletary

🔍
Search
View GitHub Profile
<#
.SYNOPSIS
Removes ghost devices from your system
.DESCRIPTION
This script will remove ghost devices from your system. These are devices that are present but have an "InstallState" as false. These devices are typically shown as 'faded'
in Device Manager, when you select "Show hidden and devices" from the view menu. This script has been tested on Windows 2008 R2 SP2 with PowerShell 3.0, 5.1, Server 2012R2
with Powershell 4.0 and Windows 10 Pro with Powershell 5.1. There is no warranty with this script. Please use cautiously as removing devices is a destructive process without
an undo.
.PARAMETER filterByFriendlyName
This parameter will exclude devices that match the partial name provided. This paramater needs to be specified in an array format for all the friendly names you want to be excluded.
@PSingletary
PSingletary / PSTemplate.ps1
Created January 11, 2020 19:30
Writitng a Powershell Script? Need a Template? Start Here
#Requires -version 2
#Requires -RunAsAdministrator
<#
.SYNOPSIS
<A brief description of the function or script. This keyword can be used only once in each topic.>
.DESCRIPTION
<A detailed description of the function or script. This keyword can be used only once in each topic.>
.PARAMETER <Parameter-Name>
@infamousjoeg
infamousjoeg / protectCredential.ps1
Last active February 5, 2020 17:58
Protecting Credentials Retrieved using @cyberark AAM Credential Providers in PowerShell Scripts [Recommended Best Practice]
# Import the modules to be used
Import-Module psPAS # https://github.com/pspete/psPAS
Import-Module CredentialRetriever # https://github.com/pspete/CredentialRetriever
# Before login, we'll request the credentials from AAM and immediately pass the PSCredential object for secure login
New-PASSession -BaseURI https://pvwa.joegarcia.dev -Credential $(Get-CCPCredential -URL https://pvwa.joegarcia.dev -AppID ApplicationID -Safe SafeName -UserName ServiceManagerUser).ToCredential() -type LDAP
# Do stuff here...
# Finally,
@IanColdwater
IanColdwater / twittermute.txt
Last active June 15, 2025 16:53
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@infamousjoeg
infamousjoeg / CYBRAutomation.md
Last active May 8, 2025 03:10
CyberArk Automation - Greatest Hits!
$URLs = "https://aka.ms/wsl-ubuntu-1804" ,"https://aka.ms/wsl-ubuntu-1804-arm" ,"https://aka.ms/wsl-ubuntu-1604" ,"https://aka.ms/wsl-debian-gnulinux" ,"https://aka.ms/wsl-kali-linux" ,"https://aka.ms/wsl-opensuse-42" ,"https://aka.ms/wsl-sles-12"
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Foreach($URL in $URLs){
$Filename = "$(Split-Path $URL -Leaf).appx"
Write-Host "Downloading: $Filename" -Foreground Yellow -NoNewline
try{
Invoke-WebRequest -Uri $URL -OutFile $Filename -UseBasicParsing
Add-AppxPackage -Path $Filename
$URL = 'https://aka.ms/wsl-ubuntu-1804'
$Filename = "$(Split-Path $URL -Leaf).appx"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $URL -OutFile $Filename -UseBasicParsing
Invoke-Item $FileName
@Bluscream
Bluscream / obs_twitch_chat.css
Last active June 5, 2025 00:36
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
Just set the URL as either one of
- https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
- https://www.twitch.tv/popout/%%TWITCHCHANNEL%%/chat
- https://www.twitch.tv/embed/%%TWITCHCHANNEL%%/chat?parent=localhost
And paste this entire file into the CSS box or paste direct import css like
@jdhitsolutions
jdhitsolutions / New-HTMLDiskReport.ps1
Last active November 8, 2024 20:34
A PowerShell function to create an html report showing drive utilization. Includes tooltip popup details and a color gradient.
#requires -version 3.0
Function New-HTMLDiskReport {
<#
.Synopsis
Create a disk utilization report with gradient coloring
.Description
This command will create an HTML report depicting drive utilization through a gradient color bar.
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 27, 2025 17:30
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat