Skip to content

Instantly share code, notes, and snippets.

View fabricesemti80's full-sized avatar

Fabrice Semti fabricesemti80

View GitHub Profile
<#
.SYNOPSIS
Script to setup Active Directory
.DESCRIPTION
This script is intended to set up a functioning AD forest with 1x root domain controller and one or more additional domain controllers
The script uses - for now - a self-signed cert to encryot the password, the thumbprint of this should be supplied on the machine.
@fabricesemti80
fabricesemti80 / OctopusAnatomy.md
Last active January 31, 2024 12:38
OctopusAnatomy#1
function Get-ContentLibraryItemPath {
<#
.NOTES
===========================================================================
Created by: Fabrice Semti
Date: 03 March 2023
Organization: VMware
Blog: http://www.fabricesemti.com
Twitter: @vBrianGraf
Github: https://github.com/fabricesemti80
@fabricesemti80
fabricesemti80 / task-solution
Created December 1, 2022 16:30
task-solution-for-interview
<#
Using any scripting language make a request to this API endpoint https://api.publicapis.org/entries
Then filter down all the objects by category "Blockchain".
#>
# search category
$category = "Blockchain" #or: $category = "Animals"
# URL definition
$endpointUri = "https://api.publicapis.org/entries"
@fabricesemti80
fabricesemti80 / removesophos.ps1
Last active September 27, 2022 10:36 — forked from ctrl-freak/removesophos.ps1
Sophos Endpoint Removal Script
# https://www.reddit.com/r/sysadmin/comments/ck677f/sophos_removal_script/
# https://pastebin.com/4eRc5WpA
#Sophos Endpoint Removal Script
#Usage examples:
# .\removesophos.ps1 # Just logs all messages to screen and file.
# .\removesophos.ps1 -Remove YES # Removes all Sophos components and logs all messages to screen and file.
# .\removesophos.ps1 -Password 1234567 -Remove YES # Password will be provided to SEDCli.exe if TP is on and SEDCLi.exe exists.
# .\removesophos.ps1 -ErrorOnly YES # Only print items that exist (errors) on screen. Still logs all to file.
@fabricesemti80
fabricesemti80 / stop-if-inactive.sh
Created June 11, 2022 14:34
aws-cloud9-shutdown-script
‎‎​
terraform apply
data.aws_availability_zones.available: Reading...
aws_dynamodb_table.terraform-lock: Refreshing state... [id=terraform_state]
aws_s3_bucket.terraform_state: Refreshing state... [id=fs80-tf-state]
data.aws_availability_zones.available: Read complete after 0s [id=us-east-1]
aws_s3_bucket_versioning.versioning: Refreshing state... [id=fs80-tf-state]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
+ create
@fabricesemti80
fabricesemti80 / personal-settings.json
Last active February 3, 2022 22:35
my-winterminal-settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": {
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
@fabricesemti80
fabricesemti80 / settings.json
Last active April 12, 2022 08:18
my-vscode-settings
{
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
@fabricesemti80
fabricesemti80 / how-to-use.md
Last active February 25, 2022 12:18
my-powershell-profile

How to use the two files

# urls
$modern_gist = "https://gist.githubusercontent.com/fabricesemti80/4b1d84458d3d0cf245ca1cfcbbc0c19b/raw/c86a7f0bfb6174dfec1c517166c2754aba496dde/modern-profile.ps1"
$legacy_gist = "https://gist.githubusercontent.com/fabricesemti80/4b1d84458d3d0cf245ca1cfcbbc0c19b/raw/12447d7faf1099c30c81dfead472ab98f60aa204/legacy-profile.ps1"
# execute
Invoke-WebRequest $modern_gist -OutFile $profile.CurrentUserAllHosts 
Invoke-WebRequest $legacy_gist -OutFile "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1"
Invoke-WebRequest $legacy_gist -OutFile "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"