Skip to content

Instantly share code, notes, and snippets.

@bryceprutsos
bryceprutsos / policy.md
Created November 25, 2020 09:40
Local group policy #windows #security

Import-Export

Open %systemroot%\system32\grouppolicy\ Within this folder, there are two folders - machine and user. Copy these to folders to the %systemroot%\system32\grouppolicy - folder on the target machine.

Restart the machine or run GPUPDATE /force

http://www.frickelsoft.net/blog/?p=31

  • Administer: secedit
@bryceprutsos
bryceprutsos / ad_photo.md
Created November 25, 2020 09:38
AD photo #ad #windows
$userName  = 'mmilic'
$photoPath = 'mmilic.png'

# Set photo
$photo = [byte[]](Get-Content $photoPath -Encoding byte)
Set-ADUser $userName -Replace @{ Photo = $photo }

# Get photo
$user = Get-ADUser $userName -Properties photo
@bryceprutsos
bryceprutsos / vpn.ps1
Created November 25, 2020 09:35
VPN CLI connect - Check Point #powershell
# Check Point client automation
# https://www.checkpoint.com/products/remote-access-vpn
param ($Endpoint = "91.143.218.198")
if (!(Get-Module CredentialManager)) {
Write-Waarning "Powershell module CredentialManager not found, installing"
Install-Module CredentialManager
}