Skip to content

Instantly share code, notes, and snippets.

@quonic
quonic / Install-RustDesk.ps1
Created December 5, 2022 22:12
Simple install script for RustDesk to point to your own server. Can be used in a GPO startup script.
$ErrorActionPreference = 'SilentlyContinue'
#Region Settings
# IP address of our server
$IpAddress = "127.0.0.1"
# The public key for our server
$PublicKeyString = "12345678"
# The temporary folder where we will store and run the installer
$TempFolder = "C:\Temp\"
#EndRegion Settings
@aderusha
aderusha / link_multiple_devices.yaml
Created September 12, 2022 21:19
Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command.
@patrickblackjr
patrickblackjr / repo naming standards.md
Created September 1, 2022 13:34
GitHub Naming Standards

Introduction

A naming strategy for GitHub repositories helps identify the repository at a glance. The naming standard has been designed to easily visualize the purpose and description of the repository.

Each GitHub repository name should meet the following criteria:

  • Descriptive
  • Readable
  • Consistent
  • Contextual
@JordanTheITGuy
JordanTheITGuy / get-standardtimes.ps1
Created August 30, 2022 19:09
Get the current time in a bunch of time zones. Or don't. Bonus points send them all to Markdown and round to the nearest second.
function Get-StandardTimes {
<#
.Description
The Get-StandardTimes function is designed to get a bundle of standardized times from various time zones you care about.
To update the list of time zones you care about update the array of time zones with the results from "Get-TimeZone".
.EXAMPLE
Get-StandardTimes
((Invoke-RestMethod -Uri ((Invoke-WebRequest -Uri "https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519" -UseBasicParsing ).links.href | Where-Object { $_ -like "*.json" })[0]).values | Where-Object { $_.name -eq "AzureAdvancedThreatProtection" }).properties.addressPrefixes | Where-Object { $_ -notlike "*:*" }
@alexmags
alexmags / BitlockerStatus.kql
Last active January 11, 2023 16:51
KQL Bitlocker status Defender for Endpoint
// inspired by SecGuru_OTX https://twitter.com/SecGuru_OTX/status/1402580761828593672
let TVMConfigAssessKB = DeviceTvmSecureConfigurationAssessmentKB
| where ConfigurationSubcategory == 'Bitlocker';
let timeframe = 7d;
DeviceLogonEvents
| where Timestamp >= ago(timeframe)
| where ActionType == 'LogonSuccess'
| summarize TimeGenerated = any(*) by DeviceName, DeviceId
| join (
DeviceTvmSecureConfigurationAssessment
@tijme
tijme / Get-AllADGroupUsersRecursively.ps1
Last active February 20, 2023 11:52
This function will return all domain users in the specified group, including recursive memberships. This also includes users in special groups such as the "Domain Users" group. Users are part of special groups via the SID instead of the members attribute. Therefore `Get-ADGroupMembers -Recursive` doesn't return users in these special groups.
Function Get-AllADGroupUsersRecursively {
<#
.SYNOPSIS
This script will identify all AD users in a specific group recursively (including special groups such as "Domain Users").
.DESCRIPTION
This script will identify all AD users in a specific group recursively (including special groups such as "Domain Users").
.NOTES
Name: Get-AllADGroupUsersRecursively
ProductName;LicensePartNumber;LicenseSKUID
APP CONNECT IW;SPZA_IW;8f0c5670-4e56-4892-b06d-91c085d7004f
Microsoft 365 Audio Conferencing;MCOMEETADV;0c266dff-15dd-4b49-8397-2bb16070ed52
AZURE ACTIVE DIRECTORY BASIC;AAD_BASIC;2b9c8e7c-319c-43a2-a2a0-48c5c6161de7
AZURE ACTIVE DIRECTORY PREMIUM P1;AAD_PREMIUM;078d2b04-f1bd-4111-bbd4-b4b1b354cef4
AZURE ACTIVE DIRECTORY PREMIUM P2;AAD_PREMIUM_P2;84a661c4-e949-4bd2-a560-ed7766fcaf2b
AZURE INFORMATION PROTECTION PLAN 1;RIGHTSMANAGEMENT;c52ea49f-fe5d-4e95-93ba-1de91d380f89
DYNAMICS 365 CUSTOMER ENGAGEMENT PLAN ENTERPRISE EDITION;DYN365_ENTERPRISE_PLAN1;ea126fc5-a19e-42e2-a731-da9d437bffcf
DYNAMICS 365 FOR CUSTOMER SERVICE ENTERPRISE EDITION;DYN365_ENTERPRISE_CUSTOMER_SERVICE;749742bf-0d37-4158-a120-33567104deeb
DYNAMICS 365 FOR FINANCIALS BUSINESS EDITION;DYN365_FINANCIALS_BUSINESS_SKU;cc13a803-544e-4464-b4e4-6d6169a138fa
function Set-RegistryValueForAllUsers {
<#
.SYNOPSIS
This function uses Active Setup to create a "seeder" key which creates or modifies a user-based registry value
for all users on a computer. If the key path doesn't exist to the value, it will automatically create the key and add the value.
.EXAMPLE
PS> Set-RegistryValueForAllUsers -RegistryInstance @{'Name' = 'Setting'; 'Type' = 'String'; 'Value' = 'someval'; 'Path' = 'SOFTWARE\Microsoft\Windows\Something'}
This example would modify the string registry value 'Type' in the path 'SOFTWARE\Microsoft\Windows\Something' to 'someval'
for every user registry hive.
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active April 22, 2024 13:32
optimising-unifi-performance

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.