Skip to content

Instantly share code, notes, and snippets.

$CaView = New-Object -Com CertificateAuthority.View.1
[void]$CaView.OpenConnection("SERVER\CA")
$templates = @{}
Get-ADObject -SearchBase (Get-ADRootDSE).ConfigurationNamingContext -filter {objectclass -eq "pKICertificateTemplate"} -Properties "CN", "DisplayName", "msPKI-Cert-Template-OID" | %{ $templates.add($_."msPKI-Cert-Template-OID",$_."DisplayName") }
$columns = @(
"Binary Certificate",
"Certificate Effective Date",
"Certificate Expiration Date",
-----BEGIN CERTIFICATE REQUEST-----
MIIC9DCCAdwCAQAwbjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEhMB8GA1UE
AwwYeG4tLW4xYWFlN2Y3by5iYWRzc2wuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAwgTs+IzuBMKz2FDVcFjMkxjrXKhoSbAitfmVnrErLHY+bMBL
YExM6rK0wA+AtrD5csmGAvlcQV0TK39xxEu86ZQuUDemZxxhjPZBQsVG0xaHJ590
6wqdEVImIXNshEx5VeTRa+gGPUgVUq2zKNuq/27/YJVKd2s58STRMbbdTcDE/FO5
bUKttXz+rvUV0jNI5yJxx8IUemwo6jdK3+pstXK0flqiFtxpsVdE2woSq97DD0d0
XEEi4Zr5G5PmrSIGKS6xukkcDCeeo/uL90ByAKySCNmMV4RTgQXL5v5rVJhAJ4XH
ELtzcO9pGEEHRVV8+WQ/PSzDqXzrkxpMhtHKhQIDAQABoEEwPwYJKoZIhvcNAQkO
-----BEGIN CERTIFICATE REQUEST-----
MIIC1zCCAb8CAQAwUDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
FTATBgNVBAcMDFdhbG51dCBDcmVlazEVMBMGA1UECgwMTHVjYXMgR2Fycm9uMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwgTs+IzuBMKz2FDVcFjMkxjr
XKhoSbAitfmVnrErLHY+bMBLYExM6rK0wA+AtrD5csmGAvlcQV0TK39xxEu86ZQu
UDemZxxhjPZBQsVG0xaHJ5906wqdEVImIXNshEx5VeTRa+gGPUgVUq2zKNuq/27/
YJVKd2s58STRMbbdTcDE/FO5bUKttXz+rvUV0jNI5yJxx8IUemwo6jdK3+pstXK0
flqiFtxpsVdE2woSq97DD0d0XEEi4Zr5G5PmrSIGKS6xukkcDCeeo/uL90ByAKyS
CNmMV4RTgQXL5v5rVJhAJ4XHELtzcO9pGEEHRVV8+WQ/PSzDqXzrkxpMhtHKhQID
AQABoEIwQAYJKoZIhvcNAQkOMTMwMTAJBgNVHRMEAjAAMCQGA1UdEQQdMBuCGW5v
-----BEGIN CERTIFICATE-----
MIIEMjCCAhqgAwIBAgIJAJTDWlDByBsuMA0GCSqGSIb3DQEBCwUAMH8xCzAJBgNV
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNp
c2NvMQ8wDQYDVQQKDAZCYWRTU0wxMjAwBgNVBAMMKUJhZFNTTCBJbnRlcm1lZGlh
dGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTE3MDMxNjIxMzc1OFoXDTE5MDMx
NjIxMzc1OFowADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANha8llF
sU36X+ITw2ZX19h8jeKotuqSZODI/GM43Log7yvepkDOQPP5Xz7wCG5WAopV35TB
rD81nA4qivlEsdaih4DQuGizm/WAGWWpS7/0uVthRi2Q3+rm/saEKNIxGr+IHMJY
yPh2jIJofnYFMmVzVy2i7mrZmb+ji4cFR5YMV+vb53m7yBGiH8YIsNsKAwMbflzy
1BWX81sRq9F4V1I1htqzlkaZHQD9ug3InEEBWAt9Mr8+qTGRAmxBiMLHBciXUlhD
@pimeys
pimeys / diabetes.json
Created February 13, 2017 22:55
a diabetes dashboard for grafana+xdrip plus
{
"__inputs": [
{
"name": "DS_DIABETES",
"label": "Diabetes",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@leeramsay
leeramsay / PSADT-Cheatsheet.ps1
Last active April 17, 2024 04:47
PSADT snippits/cheatsheet
## Commonly used PSADT env variables
$envCommonDesktop # C:\Users\Public\Desktop
$envCommonStartMenuPrograms # C:\ProgramData\Microsoft\Windows\Start Menu\Programs
$envProgramFiles # C:\Program Files
$envProgramFilesX86 # C:\Program Files (x86)
$envProgramData # c:\ProgramData
$envUserDesktop # c:\Users\{user currently logged in}\Desktop
$envUserStartMenuPrograms # c:\Users\{user currently logged in}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
$envSystemDrive # c:
$envWinDir # c:\windows
@marcus-crane
marcus-crane / mingw-w64-4.0.4-osx10.11.2.sh
Last active July 5, 2023 02:46 — forked from cosmo0920/mingw-w64-4.0.4-osx10.11.2.sh
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.11.2 [ FIXED BREW LINK ]
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")"
brew update
brew tap homebrew/versions
@meub
meub / gist:5e6efce206ceb86f7075411c452530a0
Last active April 27, 2018 09:38
Instructions on how to setup DD-WRT to recognize Amazon Dash button presses
### Dash Button Hack ###
DD WRT > Services > Services > Additional DNSMasq options:
dhcp-script=/tmp/custom.sh
DD WRT > Status > Wireless:
Press your Dash button.
Note your MAC address as it appears on the Status page.
DD WRT > Administration > Commands > Custom Script:
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 22, 2024 19:07
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 22, 2024 20:58
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###