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
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) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Get-WTSSessionInfo {
<#
.SYNOPSIS
Enumerates sessions on a Windows host.
.DESCRIPTION
Enumerates all the sessions available on a Windows host through the WTSEnumerateSessionsExW API.
<#
.SYNOPSIS
Get Installed Software
.DESCRIPTION
Gets uninstall registry location with the Registry library
.NOTES
Information or caveats about the function e.g. 'This function is not supported in Linux'
.LINK
https://github.com/SeeminglyScience/dotfiles/blob/eb62bb91eb889c290d607c8f57762a9ec1cedbe4/Documents/PowerShell/Utility.psm1#L327
.EXAMPLE
@mattcargile
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) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
function Get-SmbShareRemote {
<#
.SYNOPSIS
Enumerate shares on a remote host.
.DESCRIPTION
Enumerate shares on a remote host and returns the name, type, and special remark for those shares.
.PARAMETER ComputerName
@mattcargile
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 {
<#
.SYNOPSIS
Fetches Gif Information and direct Gif Links from Giphy, a meme delivery service
.DESCRIPTION
This is a frontend to the Giphy API to find and request gifs from Giphy. It implements the API described here: https://developers.giphy.com/docs/api/
.EXAMPLE
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%
effective).
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.