This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -Module ActiveDirectory | |
<# | |
.SYNOPSIS | |
This script queries multiple Active Directory groups for new members in a domain. It records group membership | |
in a CSV file in the same location as the script is located. On the script's initial run it will simply record | |
all members of all groups into this CSV file. On subsequent runs it will query each group's member list and compare | |
that list to what's in the CSV file. If any differences are found (added or removed) the script will update the | |
CSV file to reflect current memberships and notify an administrator of which members were either added or removed. | |
.NOTES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
def prRed(output): print("\033[91m{}\033[00m".format(output)) | |
if len(sys.argv) < 3: | |
print("Not enough arguments. Need two files to compare (old first, new last).") | |
exit(1) | |
if len(sys.argv) > 3: | |
print("Too many arguments. Need two files to compare only (old first, new last).") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# examples: | |
# .\REST_GET_to_CSV_ps7.ps1 https://api.github.com/repos/powershell/powershell/issues x x | |
$ErrorActionPreference = "Stop" | |
$url = $Args[0] | |
$headerName = $Args[1] | |
$headerContent = $Args[2] | |
$maxRelLink = $Args[3] | |
$dataname = $Args[4] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Okta: Check Uniqeness of employeeNumber | |
#Requires -Version 7.0 | |
$ErrorActionPreference = "Stop" | |
########## helper functions ###### | |
function iterateUsers($users){ | |
$employeeNumberMap = @{} | |
foreach($user in $users){ | |
$userId = $user.id # example: 00u4rruv8mIU5CvRz4234 | |
if(!$userId){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 7.0 | |
$ErrorActionPreference = "Stop" | |
########## helper functions ###### | |
function iterateActiveUsers($users){ | |
foreach($user in $users){ | |
$userId = $user.id # 00u4rruv8mIU5CvRz4234 | |
if(!$userId){ | |
# something is wrong. exit. | |
Write-Host "No field 'id' found - exiting." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(() => { | |
const items = document.querySelectorAll('a'); | |
let delay = 0; | |
for (let index = 0; index < items.length; index++) { | |
const item = items[index]; | |
if (item.getAttribute('href') != null && item.getAttribute('href').endsWith('.pdf')){ | |
/* only write last part of link to download element (filename) */ | |
var downloadUri = item.getAttribute('href'); | |
var n = downloadUri.lastIndexOf('/'); | |
var result = downloadUri.substring(n + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(()=>{alert(ytInitialData.metadata.channelMetadataRenderer.rssUrl);})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example calls: | |
# ./renamePictures.ps1 | |
# ./renamePictures.ps1 -defaultDescription Holland2022 | |
# ./renamePictures.ps1 -fixedDescription Hallo123 | |
# ./renamePictures.ps1 -folder hallo\. -defaultDescription Holland2022 | |
param( | |
[string]$folder=".", | |
[switch]$simulate, | |
[switch]$removeExistingDates, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## deletes all link files on Desktop and Common Desktop Directories, that link to Program Files. | |
## | |
# Get the desktop folder path | |
$desktopPath = [Environment]::GetFolderPath("Desktop") | |
$desktopPathPublic = [Environment]::GetFolderPath("CommonDesktopDirectory") | |
$ErrorActionPreference = "Stop" |
OlderNewer