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
function Disable-Notifications { | |
param ( | |
[string]$ProjectId, | |
[string]$SettingId, | |
[string]$BearerToken | |
) | |
$val = 'never' | |
if ($SettingId -eq 'push-notifications') { | |
$val = 'false' | |
} |
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
#!/bin/bash | |
helpFunction() | |
{ | |
echo "" | |
echo "Usage: $0 -i <ACL IP ID> -p <PATH TO NPM /data folder>" | |
echo -e "\t-i This ID can be found by querying the database" | |
echo -e "\t-p The path to the NPM /data folder." | |
echo -e "\t-d The name of the docker container running NPM." | |
exit 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
# Original author: Harm Veenstra | |
# Source: https://powershellisfun.com/2022/07/11/updating-your-powershell-modules-to-the-latest-version-plus-cleaning-up-older-versions/ | |
function Update-Modules { | |
param ( | |
[switch]$AllowPrerelease, | |
[string]$Name = '*', | |
[switch]$WhatIf | |
) | |
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
function Convert-Currency { | |
<# | |
.SYNOPSIS | |
Utilizes free APIs to convert between currencies. | |
.DESCRIPTION | |
The converter API updates its exchange rates once per 24 hours. To prevent rate limiting, this script will | |
cache data (in %TEMP%\PSConvertCurrency) and check its contents for its expiry date. Only after the data has | |
expired will it query the API again. A known, potential future issue is that the script will, in its current | |
state, never consider the currency metadata expired. | |
.PARAMETER List |
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
<# Based on https://raw.githubusercontent.com/groovemaster17/IntunePowershell/main/removeChat.ps1, with a slight modification | |
to get localized admin group name #> | |
$Action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-executionpolicy bypass -command "reg.exe add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f | Out-Host"' | |
$SID = (New-Object System.Security.Principal.SecurityIdentifier([System.Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid, $Null)).Value | |
$Principal = New-ScheduledTaskPrincipal -GroupId $SID | |
Register-ScheduledTask -TaskName 'uninstallChat' -Action $action -Principal $Principal |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#SingleInstance Force | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
profiles := [] | |
InsertionSort(array) | |
{ |