Skip to content

Instantly share code, notes, and snippets.

$header = @"
<style>
h1 {
font-family: Arial, Helvetica, sans-serif;
color: #296940;
font-size: 28px;
}
h2 {
font-family: Arial, Helvetica, sans-serif;
@heyvoon
heyvoon / install_terraform_linux.sh
Created July 14, 2022 13:29
Install How To Install Terraform on Ubuntu 22.04 (Linux Mint)
#! /bin/sh
echo "First, install repository addition dependencies"
sudo apt update
sudo apt install software-properties-common gnupg2 curl
echo "Import repository GPG key"
curl https://apt.releases.hashicorp.com/gpg | gpg --dearmor > hashicorp.gpg
sudo install -o root -g root -m 644 hashicorp.gpg /etc/apt/trusted.gpg.d/
@heyvoon
heyvoon / export-kubeconfig-from-aks
Created June 29, 2022 20:16 — forked from dcasati/export-kubeconfig-from-aks
Export KUBECONFIG from AKS
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss
@heyvoon
heyvoon / Remove-Owner-From-M365Groups.ps1
Created January 18, 2022 14:31
A little script to help remove/add members/owners of M365 groups in bulk.
# Get CSV content
$records = Import-Csv C:\Temp\M365Groups_IOwn.csv -Delimiter ","
# Variables Declaration
$Links = "username_of_user_to_be_removed"
# Create arrays for skipped and failed users
$GroupData = @()
#$ProcessedGroups = @()
#$SkippedGroups = @()
@heyvoon
heyvoon / Add-User-New-ProxyAddress.ps1
Last active September 17, 2021 13:23
This script will add a new proxy SMTP address to the AD multi-value attribute proxyAddresses.
<#
This script will add a new proxy SMTP address to the AD multi-value attribute proxyAddresses.
The format of the new address is <SamAccountName>@newDomain.com
How to use it:
Change the following variables accordingly
OU where you want accounts to be processed.
$searchbase = "OU=Test,DC=Contoso,DC=local"
<#
.SYNOPSIS
Copy-ADGroup-Members.sp1 - Copy Group members from source to destination AD Group
.DESCRIPTION
This PowerShell script will copy members from source group to a destination group specified below.
.NOTES
Written by: Andre Barbosa de Amaral
@heyvoon
heyvoon / Get-GroupMembership-Report-by-OU.ps1
Created September 10, 2021 12:33
This PowerShell script will get all groups by a specified OU and generate a CSV report on the specified folder containing the columns "Name", "MemberGUID", "MemberOf", "GroupGUID". Before running the script change the $ou and the $logFolder variables.
<#
.SYNOPSIS
Get-GroupMembership-Report-by-OU.ps1 - Generate Group Membership Report by OU
.DESCRIPTION
This PowerShell script will get all groups by a specified OU and generate a CSV report on the specified folder containing the columns "Name", "MemberGUID", "MemberOf", "GroupGUID".
Before running the script change the $ou and the $logFolder variables.
.OUTPUTS
Results are output to a CSV text log file.
@heyvoon
heyvoon / profile.ps1
Last active July 4, 2021 22:34 — forked from timsneath/profile.ps1
PowerShell template profile: adds some useful aliases and functions
<#
Author: Andre Barbosa de Amaral
Requirements for this script to work:
- Notepadd++
- ConnectM365Services.psm1 module installed
Get the module here -> https://gist.github.com/heyvoon/afb3e081f6395b47732e9555ec934715
!! Change the variables below accordingly !!
@heyvoon
heyvoon / ConnectM365Services.psm1
Last active April 1, 2021 09:33
A module that helps you to connect to all Office 365 Services PowerShell (Supports MFA too)
<# MORE INFO
https://o365reports.com/2019/10/05/connect-all-office-365-services-powershell
INSTALATION:
Copy this file under "C:\Program Files\WindowsPowerShell\Modules\ConnectM365Services" folder.
Run "Import-Module -name ConnectM365Services"
#>
Function ConnectM365 {
@heyvoon
heyvoon / PowerShell_Profile.ps1
Last active April 1, 2021 13:34
A PowerShell profile with some useful functions
<#
Author: Andre Barbosa de Amaral
Peaces needed to the following to work:
- Notepadd++
- ConnectM365Services.psm1 module installed
Get the module here -> https://gist.github.com/heyvoon/afb3e081f6395b47732e9555ec934715
!! Change the AD Sync Server name on the Delta function below to your own server !!