Skip to content

Instantly share code, notes, and snippets.

View psrdrgz's full-sized avatar

Adrian Rodriguez psrdrgz

  • Rapid City, South Dakota
View GitHub Profile
@psrdrgz
psrdrgz / SMBGhostStuff.ps1
Last active March 11, 2020 16:04
SMBGhost Stuff for ConfigMgr
# Create ConfigMgr Script to set DisableCompression to 1
New-CMScript -ScriptText 'Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 1 -Force' -ScriptName 'ADV200005 - Disable SMBv3 Compression' -Fast
# Create ConfigMgr Script to set DisableCompression to 0
New-CMScript -ScriptText 'Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 0 -Force' -ScriptName 'ADV200005 - Re-Enable SMBv3 Compression' -Fast
function Enable-RemotePSRemoting
{
[cmdletbinding()]
Param(
[Parameter(Mandatory = $True,Position = 0,ValueFromPipelineByPropertyName = $True)]
[string[]]$ComputerName,
[Parameter(Mandatory = $False)]
[switch]$Force,
@psrdrgz
psrdrgz / ConfigMgrAppInfo.ps1
Last active April 10, 2018 12:56
A script to document all the software properties and settings including Software Name, Content Location, Installation program (command), the Uninstall program (command), and dependencies.
function Get-ConfigMgrSite
{
[cmdletbinding()]
Param()
Begin{}
Process{
$ManagementPointSearcher = [adsisearcher]'ObjectClass=mssmsmanagementpoint'
using namespace System.Management.Automation
function Search-Sysmon
{
[CmdletBinding(DefaultParameterSetName='InProcess')]
Param(
[Parameter(Mandatory = $False)]
[switch]$CreateRemoteThread,
@psrdrgz
psrdrgz / SysmonCheck.ps1
Created November 21, 2017 01:44
PowerShell functions for parsing Sysmon event logs
using namespace System.Management.Automation
function Search-SysmonCommandline
{
[CmdletBinding(DefaultParameterSetName='InProcess')]
Param(
[Parameter(Mandatory = $True)]
[string[]]$CommandLine,
[Parameter(Mandatory = $False)]

Keybase proof

I hereby claim:

To claim this, I am signing this object:

#requires -Version 5
function Confirm-DomainAdmin
{
[cmdletbinding()]
Param(
[Parameter(Mandatory = $True, Position = 0,ValueFromPipelineByPropertyName = $True)]
[Alias('Username')]
[string[]]$SamAccountName
)
@psrdrgz
psrdrgz / ManageExchange.psm1
Created January 19, 2016 13:25
Implicitly remote to on-premise Exchange & Exchange Online.
function Connect-ExchangeOnline
{
[CmdletBinding()]
Param(
[Parameter(Mandatory = $False)]
[pscredential]$Credential = $null,
[Parameter(Mandatory = $False)]
[string]$ConnectionURI = 'https://outlook.office365.com/powershell-liveid',