This file contains hidden or 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
$currentDate = Get-Date | |
$currentDate9am = $currentDate.Date.AddHours(9) | |
$weekendDaysEncountered = 0 | |
$nextDayOccurrance = @("NULL","NULL","NULL","NULL","NULL") | |
for ($i = 0; $i -le 7; $i++) { | |
$targetDate = $currentDate9am.AddDays($i) | |
Write-Host $target-Date.DayOfWeek | |
switch ($targetDate.DayOfWeek) { | |
'Monday' {$nextDayOccurrance[0] = $targetDate.ToString("MM/dd")} | |
'Tuesday' {$nextDayOccurrance[1] = $targetDate.ToString("MM/dd")} |
This file contains hidden or 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
This example shows a toast with a button for each day of the week. When selected, it runs a script called WindowsUpdatePS1.ps1, passing it the day of the week as an argument. | |
You have to create a registry entry for this. | |
<toast> | |
... | |
<actions> | |
<action content="Mon" arguments="ToastUpdateWindows:,Monday" activationType="protocol" /> | |
<action content="Tues" arguments="ToastUpdateWindows:,Tuesday" activationType="protocol" /> | |
<action content="Wed" arguments="ToastUpdateWindows:,Wednesday" activationType="protocol" /> | |
<action content="Thurs" arguments="ToastUpdateWindows:,Thursday" activationType="protocol" /> |
This file contains hidden or 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
# Script to change all registry entries containing old username to new username. | |
# | |
# 1. Create a second admin account on your PC | |
# 2. Log out of your primary account and into the secondary account | |
# 3. Rename profile via Control Panel > User Accounts | |
# 4. Rename old username in C:\Users\ to new username | |
# 5. Change the two variables below and run the script in Admin PowerShell. It will take a long time. | |
# 6. Log into the renamed profile and run the script again. This will change the registry entries that may be only editable by the owner account. | |
# Define the old and new user paths |
This file contains hidden or 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 requests | |
import json | |
import mwclient | |
################### CONFIGURE ME ################### | |
site = mwclient.Site('YOUR_WEBSITE.com', path='/wiki/') | |
site.login(username='USERNAME_HERE', password='PASSWORD_HERE') | |
URL = "https://YOUR_WEBSITE.com/wiki/api.php" |