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 |
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-InstalledApps | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory = $false, ParameterSetName ='list')] | |
[switch]$List, | |
[Parameter(Mandatory = $false, ParameterSetName ='detect')] | |
[string]$Appname, |
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
# Quick way to bulk deploy a baseline to alot of collections | |
# make sure to edit: | |
## BaselineName | |
## Collections | |
## Schedule | |
if((Get-Module ConfigurationManager) -eq $null) { | |
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" | |
} |