Skip to content

Instantly share code, notes, and snippets.

View mattcargile's full-sized avatar

Matt Cargile mattcargile

  • Baton Rouge, LA
View GitHub Profile
mattcargile / Get-WTSSessionInfo.ps1
Last active March 26, 2024 18:29 — forked from jborean93/Get-WTSSessionInfo.ps1
Tries to replicate qwinsta but return structured objects
# Copyright: (c) 2022, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
Function Get-WTSSessionInfo {
Enumerates sessions on a Windows host.
Enumerates all the sessions available on a Windows host through the WTSEnumerateSessionsExW API.
Get Installed Software
Gets uninstall registry location with the Registry library
Information or caveats about the function e.g. 'This function is not supported in Linux'
mattcargile / Get-SmbShareRemote.ps1
Last active March 28, 2023 21:43 — forked from jborean93/Get-SmbShareInfo.ps1
Enumerates shares on a remote host
# Copyright: (c) 2020, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
function Get-SmbShareRemote {
Enumerate shares on a remote host.
Enumerate shares on a remote host and returns the name, type, and special remark for those shares.
.PARAMETER ComputerName
mattcargile / Search-Giphy.ps1
Last active December 26, 2022 12:56 — forked from JustinGrote/Search-Giphy.ps1
Get a random gif from Giphy. ***NOTE: Invoke-TerminalGif was moved to MSTerminalSettings module***
function Search-Giphy {
Fetches Gif Information and direct Gif Links from Giphy, a meme delivery service
This is a frontend to the Giphy API to find and request gifs from Giphy. It implements the API described here:
PS> Search-Giphy
Returns a random gif information object
title bitly_url username source
2022-05-06 17:32:25,178 26604 [DEBUG] - XmlConfiguration is now operational
2022-05-06 17:32:25,254 26604 [INFO ] - ============================================================
2022-05-06 17:32:25,414 26604 [DEBUG] - User may be subject to UAC, checking for a split token (not 100%
2022-05-06 17:32:25,439 26604 [DEBUG] - Chocolatey is running on Windows v 10.0.19043.0
2022-05-06 17:32:25,441 26604 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2022-05-06 17:32:25,442 26604 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2022-05-06 17:32:25,449 26604 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" outdated -r
2022-05-06 17:32:25,450 26604 [DEBUG] - Received arguments: outdated -r
2022-05-06 17:32:25,494 26604 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.