Skip to content

Instantly share code, notes, and snippets.

View secpg's full-sized avatar

Pete Greenwood secpg

View GitHub Profile
@secpg
secpg / CreateLocalAdminUser.ps1
Created December 20, 2018 02:12
Powershell function to create a Windows Local Admin User.
function Create-NewLocalAdmin {
[CmdletBinding()]
param (
[String] $NewLocalAdmin,
[SecureString] $Password
)
begin {
}
process {
New-LocalUser "$NewLocalAdmin" -Password $Password -FullName "$NewLocalAdmin" -Description "Temporary local admin"
@secpg
secpg / .zshrc
Created September 28, 2018 01:26
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# This script uses the PSPAS Module: https://github.com/pspete/psPAS
# It reads a csv file and adds the AppID to a safe with the required permissions
# csv file format:
#Safe,Application
#<safeName>,<appID>
#<safeName>,<appID>
# Set BaseURL for CyberArk REST Endpoint
BASEURL = "____"
CSVPATH = "____"
@secpg
secpg / ansible-summary.md
Created August 15, 2018 02:45 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@secpg
secpg / PoSh_CCP_CertAuth_PWprompt.ps1
Last active August 7, 2018 17:37
CyberArk CCP - This script will perform a GET Password call to the CCP using client certificate authentication. The user will be prompted for the certificate PW at runtime.
#### ####
## ##
# This script will call the CCP using client certificate authentication #
# You will be prompted for the pfx file password #
## ##
#### ####
# Declare Variables
$BASEURL="___" #example: "https://pvwa.cyberark.com"
$SAFE="___" #CyberArk Safe name
@secpg
secpg / PoSh_CCP_CertAuth_Imported.ps1
Last active August 7, 2018 17:42
CyberArk CCP - This script will perform a GET Password call to the CCP using client certificate authentication. It assumes that the certificate has been previously imported into the machines cert store.
#### ####
## ##
# This script will call the CCP using client certificate authentication #
# Pulls the cert from the local user/personal store. No PW needed #
## ##
#### ####
# Declare Variables
$BASEURL="___" #example: "https://pvwa.cyberark.com"
$SAFE="___" #CyberArk Safe name