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
<# | |
.SYNOPSIS | |
Creates and installs a new Wi-Fi (WLAN) profile using a specified SSID and pre-shared key. | |
.DESCRIPTION | |
This script automates the creation of a wireless network profile on a Windows system. | |
It takes a Wi-Fi SSID and pre-shared key (PSK) as input, converts the SSID to its hexadecimal form, | |
generates a WLAN profile XML configuration, and adds it to the system using 'netsh wlan add profile'. | |
After installation, the temporary XML file is deleted. This is useful for quickly deploying Wi-Fi settings | |
across multiple machines without manual user input. | |
.PARAMETER WlanSSID |
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
$HoursPerDay = 8 | |
# get our current date | |
$StartDate = get-date | |
# get the first day of the current month, then add 1 month the get the next month, and subtract 1 day | |
# this will give you the last day of the current mont | |
$EndDate = (get-date -day 1).AddMonths(1).AddDays(-1) | |
$WorkingDays = 0 |
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 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
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": | |
{ | |
"action": "copy", | |
"singleLine": false |
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
function New-DifferencingVm | |
{ | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$VMName, | |
[Parameter(Mandatory=$false)] | |
[string]$DiskName=$VMName, | |
[Parameter(Mandatory=$false)] |
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 script is used to check and update your GoDaddy DNS server to the IP address of your current internet connection. | |
First go to GoDaddy developer site to create a developer account and get your key and secret | |
https://developer.godaddy.com/getstarted | |
Update the first 4 varriables with your information | |
#> | |
$domain = '' # your domain | |
$key = '' #key for godaddy developer API |
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
# ______ __ _ | |
# / ____/_ ______ _____/ /_(_)___ ____ _____ | |
# / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/ | |
# / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ ) | |
# /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/ | |
function Get-YamlFrontMatter | |
{ | |
param |
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
$GroupId = "bc8b6f66-fd59-412f-9b2e-1a0de52466a5" | |
# Importing the SDK Module | |
Import-Module -Name Microsoft.Graph.DeviceManagement.Actions | |
Connect-MgGraph -scope DeviceManagementManagedDevices.PrivilegedOperations.All, DeviceManagementManagedDevices.ReadWrite.All,DeviceManagementManagedDevices.Read.All | |
#### Gets All devices | |
$Devices = Get-MgGroupMember -GroupId $GroupId | |
Foreach ($Device in $Devices) |
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
$GroupId = "" | |
$devicelist = get-content .\devicelist.csv | ConvertFrom-Csv | |
foreach ($device in $devicelist) | |
{ | |
write-host "adding $($device.devicename) to our group" | |
$DeviceID = $device.MicrosoftEntradeviceID | |
$EntraDeviceID = Get-MgDevice -Filter "DeviceId eq '$DeviceID'" | Select-Object -ExpandProperty id | |
New-MgGroupMember -groupid $GroupId -DirectoryObjectId $EntraDeviceID |
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
<# | |
.SYNOPSIS | |
This script clears the local GPO cache for both user and device levels using remove-item commands. | |
.DESCRIPTION | |
This script clears the local GPO cache for both user and device levels using remove-item commands. | |
It stops any ongoing transcript, starts a new transcript for logging purposes, clears the GPO cache, | |
and then starts a new transcript for logging purposes. | |
.NOTES | |
Author: BDW | |
Date: 26/03/2024 |
NewerOlder