Skip to content

Instantly share code, notes, and snippets.

View AvrumFeldman's full-sized avatar

Avrum Feldman AvrumFeldman

  • usa
View GitHub Profile
@AvrumFeldman
AvrumFeldman / Get-GoogleOAuthClientFlowToken.ps1
Created March 21, 2025 16:34
Google Client Credential OAuth flow
param(
[parameter(mandatory)]
$path, # Path to google service account key
[parameter(mandatory)]
$TargetUser
)
$serviceAccountJson = Get-Content -Path $path | ConvertFrom-Json
$ServiceAccount = $serviceAccountJson.client_email
$clientID = $serviceAccountJson.client_id
$keyID = $serviceAccountJson.private_key_id
@AvrumFeldman
AvrumFeldman / Get-WinProxyInfo.ps1
Created September 11, 2024 17:45 — forked from nullbind/Get-WinProxyInfo.ps1
Get-WinProxyInfo.ps1
# Work in progress
# Automation goals
# 1 enumeration HTTP proxy configurations on Windows and AD domain joined systems
# 2 parse the proxies
# 3 test for unauthenticated outbound internet access.
# 4 produce inventory of available proxies and if auth is requires (proxy_url, proxy_port, proxy_source, authentication_required)
# ----------------------------------
# Get-HttpProxyInfo
# ----------------------------------
@AvrumFeldman
AvrumFeldman / Create-Unix-VM-cloud-init.ps1
Created March 13, 2023 14:54 — forked from jerome-massey/Create-Unix-VM-cloud-init.ps1
Changes: add dhcp to meta-data, add ssh_import_id_gh to user-data (lab environment), update path to Windows Kit (10), update sc / Set-Content to run on PS 7.2.5, disabled Set-VMNetworkProperties (vlan 1)
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed
@AvrumFeldman
AvrumFeldman / Delete-MesssagesUsingEWS.ps1
Created June 2, 2021 19:47 — forked from sunnyc7/Delete-MesssagesUsingEWS.ps1
Delete email messages from Inbox using Exchange Web Services (EWS)
# Author: Sunny Chakraborty (@sunnyc7)
# Note: No one has written Exchange Web Services Scripts EVER without thanking Glenn Scales and Mike Pfeiffer :).
# Hence..thanks Glenn and Mike.
# Glenn Scales Blog > http://gsexdev.blogspot.com/
# Mike Pfeiffer blog > http://www.mikepfeiffer.net/
#region Helper Functions
Function Delete-MessageItem {