Skip to content

Instantly share code, notes, and snippets.

View holmes-py's full-sized avatar
:electron:
sudo pacman -Syu

Hardeep Singh holmes-py

:electron:
sudo pacman -Syu
View GitHub Profile
Retrieves all of the trust relationships for this domain - Does not Grab Forest Trusts
([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()
Grab Forest Trusts.
([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).GetAllTrustRelationships()
@holmes-py
holmes-py / sed cheatsheet
Created December 4, 2020 15:25 — forked from asenchi/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'