Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Come on, Jump!

Maurice MJ de Jong MauRiEEZZZ

💭
Come on, Jump!
View GitHub Profile
@MauRiEEZZZ
MauRiEEZZZ / Get-AvProviders.ps1
Created Apr 13, 2020
Get av providers from registry
View Get-AvProviders.ps1
Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Security Center\Provider\Av" | Get-ItemProperty
@MauRiEEZZZ
MauRiEEZZZ / Enumerators.ps1
Created Apr 13, 2020
BitFlag Enumerators for State or productState
View Enumerators.ps1
[Flags()] enum ProductState
{
Off = 0x0000
On = 0x1000
Snoozed = 0x2000
Expired = 0x3000
}
[Flags()] enum SignatureStatus
{
View install_wrt.helpers.ps1
Install-Module wrt.helpers -Scope CurrentUser -Force
Test-IsProductStateOn 39756
View Test-IsProductStateOn.ps1
function Test-IsProductStateOn {
<#
.SYNOPSIS
Tests if given product state has product state flag to On
.DESCRIPTION
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
MauRiEEZZZ / .txt
Last active Apr 13, 2020
objects return by Get-CimInstance
View .txt
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
MauRiEEZZZ / gather_ciminstance.ps1
Last active Apr 5, 2020
Gather objects from the
View gather_ciminstance.ps1
Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntivirusProduct
@MauRiEEZZZ
MauRiEEZZZ / New-SelfSignedAlwaysEncryptedCertificate.ps1
Created Mar 4, 2020
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
View New-SelfSignedAlwaysEncryptedCertificate.ps1
$storeLocation = "CurrentUser"
$certPath = "Cert:" + $storeLocation + "\My"
$cert = New-SelfSignedCertificate -Subject "cert1" -CertStoreLocation $certPath -KeyExportPolicy Exportable -Type CodeSigningCert -KeySpec None -KeyUsage KeyEncipherment -HashAlgorithm sha256 -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.8.2.2,1.3.6.1.4.1.311.10.3.11")
# 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
MauRiEEZZZ / vtx.lua
Created Nov 19, 2019 — forked from ghostface/vtx.lua
VTX Power switching via transmitter switch (Opentx/Betaflight/Tramp/Smartaudio)
View vtx.lua
--
-- *Fixed version of wkochFPV for BF 3.5
-- Original: https://github.com/betaflight/betaflight/issues/3094#issuecomment-302953603
-- 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)
--
View cre_name_kv_secr.sh
#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)
View cre_rg.sh
az group create --name "ContosoResourceGroup" --location eastus
You can’t perform that action at this time.