Skip to content

Instantly share code, notes, and snippets.

View MauRiEEZZZ's full-sized avatar
Come on, Jump!

Maurice MJ de Jong MauRiEEZZZ

Come on, Jump!
View GitHub Profile
MauRiEEZZZ / Get-AvProviders.ps1
Created April 13, 2020 13:29
Get av providers from registry
Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Security Center\Provider\Av" | Get-ItemProperty
MauRiEEZZZ / Enumerators.ps1
Created April 13, 2020 12:18
BitFlag Enumerators for State or productState
[Flags()] enum ProductState
Off = 0x0000
On = 0x1000
Snoozed = 0x2000
Expired = 0x3000
[Flags()] enum SignatureStatus
MauRiEEZZZ / install_wrt.helpers.ps1
Last active April 13, 2020 12:44
install our module!!
Install-Module wrt.helpers -Scope CurrentUser -Force
Test-IsProductStateOn 39756
MauRiEEZZZ / Test-IsProductStateOn.ps1
Last active April 13, 2020 12:14
function Test-IsProductStateOn {
Tests if given product state has product state flag to On
Registry, WMI and other properties may contain a DWORD value or data object that represents the state of the corresponding product.
Specific state of the product is set to a bit in this DWORD, these states can be optained using bitwise operations.
This function will return true if the flag for product state is set to on, meaning this product is enabled.
.PARAMETER ProductState
The value (DWORD) containing the bitflags.
MauRiEEZZZ / .txt
Last active April 13, 2020 12:00
objects return by Get-CimInstance
displayName : Windows Defender
instanceGuid : {D68DDC3A-831F-4fae-9E44-DA132C1ACF46}
pathToSignedProductExe : windowsdefender://
pathToSignedReportingExe : %ProgramFiles%\Windows Defender\MsMpeng.exe
productState : 393472
timestamp : Wed, 01 Apr 2020 16:56:49 GMT
PSComputerName :
MauRiEEZZZ / gather_ciminstance.ps1
Last active April 5, 2020 14:37
Gather objects from the
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntivirusProduct
MauRiEEZZZ / New-SelfSignedAlwaysEncryptedCertificate.ps1
Created March 4, 2020 10:39
This little script will create a certificate that can be used for the Master Collumn Encryption Key, location and private key permissions will need to be altered
$storeLocation = "CurrentUser"
$certPath = "Cert:" + $storeLocation + "\My"
$cert = New-SelfSignedCertificate -Subject "cert1" -CertStoreLocation $certPath -KeyExportPolicy Exportable -Type CodeSigningCert -KeySpec None -KeyUsage KeyEncipherment -HashAlgorithm sha256 -TextExtension @("{text},")
# keep in mind the Serviceaccount needs access to the private key, permissions need to be set and also the location would need to be altered.
MauRiEEZZZ / vtx.lua
Created November 19, 2019 21:15 — forked from ghostface/vtx.lua
VTX Power switching via transmitter switch (Opentx/Betaflight/Tramp/Smartaudio)
-- *Fixed version of wkochFPV for BF 3.5
-- Original:
-- Note: If you put it on a 3-way switch and go from first to third position fast it may not register correctly so better step through slowly
-- *Changes:
-- Corrected loading of dependencies
-- Shortened filename to make it compatible with latest opentx restrictions
-- Added a condition in the script for pit mode (vtx power 0 alone didn't work for me)
#we create a randomized name, the name of the keyvault has to be unique within the current cloud
#it will be publicly available using this name.
keyvaultName="keyvault-$(cat /proc/sys/kernel/random/uuid | cut -c-7)"
keyvaultURI=$(az keyvault create --name $keyvaultName --resource-group "ContosoResourceGroup" --location eastus --query "properties.vaultUri" --output tsv)
az keyvault secret set --vault-name $keyvaultName --name "ExamplePassword" --value "sampleSecretValueIn_plaintext"
tenantID=$(az account show --output tsv --query tenantId)
az group create --name "ContosoResourceGroup" --location eastus