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
<# | |
.SYNOPSIS | |
Install Chrome and create the registry key to trigger installation of Chrome extension. | |
.DESCRIPTION | |
This script installs Google Chrome by using Chocolatey and creates the registry key that will trigger the installation of the Chrome extension. | |
This script is created for usage with Microsoft Intune, which doesn't support parameters yet. | |
.NOTES | |
Author: Peter van der Woude | |
Contact: pvanderwoude@hotmail.com | |
Date published: 02-07-2018 |
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
<# | |
.SYNOPSIS | |
Enable Windows Sandbox. | |
.DESCRIPTION | |
This script will simply enable the Windows Sandbox for the user. | |
.NOTES | |
Author: Peter van der Woude | |
Contact: pvanderwoude@hotmail.com | |
Date published: 07-01-2019 | |
Current version: 1.0 |
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
<# | |
.SYNOPSIS | |
Install Chocolatey packages. | |
.DESCRIPTION | |
This script will install Chocolatey packages and provide notifications to the user after succesful installation. | |
.NOTES | |
Author: Peter van der Woude | |
Contact: pvanderwoude@hotmail.com | |
Date published: 17-04-2019 |
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
<# | |
.SYNOPSIS | |
Configure the Google Chrome Cloud Management enrollment token. | |
.DESCRIPTION | |
This script adds a registry key that will set the Google Chrome Cloud Management enrollment token to enable the cloud-based management of the browser. | |
.NOTES | |
Author: Peter van der Woude | |
Contact: pvanderwoude@hotmail.com | |
Date published: 22-04-2020 | |
Current version: 1.0 |
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 Update-PolicySetting { | |
<# | |
.SYNOPSIS | |
A simple function to update policy settings by using MDM WMI Bridge | |
.DESCRIPTION | |
This function provides the capability to adjust policy settings by using the MDM WMI Bridge. | |
It supports the capabilities to create, update and remove an instance | |
.PARAMETER className | |
This parameter is required for the name of the WMI class | |
.PARAMETER parentID |
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
#Define variables | |
$localAdministrators = @() | |
$memberCount = 0 | |
$numberLocalAdministrators = 4 #Adjust to your number of administrators | |
try { | |
$currentUser = (Get-CimInstance Win32_ComputerSystem).Username -replace '.*\\' | |
$administratorsGroup = ([ADSI]"WinNT://$env:COMPUTERNAME").psbase.children.find("Administrators") | |
$administratorsGroupMembers= $administratorsGroup.psbase.invoke("Members") | |
foreach ($administrator in $administratorsGroupMembers) { |
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
#Define variables | |
$currentUser = (Get-CimInstance Win32_ComputerSystem).Username -replace '.*\\' | |
$localAdministrators = @("[YourGlobalAdminRoleSid]","[YourDeviceAdminRoleSid]") #Adjust to your local administrators | |
try { | |
$administratorsGroup = ([ADSI]"WinNT://$env:COMPUTERNAME").psbase.children.find("Administrators") | |
$administratorsGroupMembers = $administratorsGroup.psbase.invoke("Members") | |
foreach ($administratorsGroupMember in $administratorsGroupMembers) { | |
$administrator = $administratorsGroupMember.GetType().InvokeMember('Name','GetProperty',$null,$administratorsGroupMember,$null) | |
if (($administrator -ne "Administrator") -and ($administrator -ne $currentUser)) { |