Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
@jhochwald
jhochwald / Set-TeamsAudioVideoPermissionInBrowser.ps1
Created March 31, 2023 10:04
Allow the Teams Web App to access cam and microphone automatically
<#
.SYNOPSIS
Allow the Teams Web App to access cam and microphone automatically
.DESCRIPTION
Allow the Teams Web App to access cam and microphone automatically,
we support Microsoft Edge, Google Chrome and the Brave browser
.EXAMPLE
PS C:\> .\Set-TeamsAudioVideoPermissionInBrowser.ps1
@jhochwald
jhochwald / Setup-MSCommerceProductPolicies.ps1
Last active February 27, 2023 10:36
Configure "Self-Service Purchase" within a Microsoft 365 tenant - Related to MC516356
#requires -Version 2.0 -Modules MSCommerce
<#
.SYNOPSIS
Configure "self-service trial of Viva Goals" within a tenant
.DESCRIPTION
Configure "self-service trial of Viva Goals" within a Microsoft 365 tenant
.EXAMPLE
PS C:\> .\Setup-MSCommerceProductPolicies.ps1
@jhochwald
jhochwald / Invoke-CleanupTestVM.ps1
Created February 11, 2023 16:57
Clean-up my test VM for further testing
#requires -Version 2.0
<#
.SYNOPSIS
Clean-up my test VM for further testing
.DESCRIPTION
Clean-up my test VM for further testing
Very simple, but brutal, clean-up script!
@jhochwald
jhochwald / Get-MobileDeviceReporting.ps1
Created April 7, 2021 20:57
Get a basic report of Mobile Devices connected to the Microsoft 365 Tenant
#requires -Version 3.0 -Modules ExchangeOnlineManagement
<#
.SYNOPSIS
Get a basic report of Mobile Devices
.DESCRIPTION
Get a basic report of Mobile Devices connected to the Microsoft 365 Tenant
.EXAMPLE
PS C:\> .\Get-MobileDeviceReporting.ps1
@jhochwald
jhochwald / windows_hardening.cmd
Created November 27, 2022 19:47 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@jhochwald
jhochwald / Windows Defender Exclusions VS 2022.ps1
Last active November 21, 2022 13:20 — forked from Braytiner/Windows Defender Exclusions VS 2022.ps1
Adds Windows Defender exclusions for Visual Studio 2022
$pathExclusions = (New-Object -TypeName System.Collections.ArrayList)
$processExclusions = (New-Object -TypeName System.Collections.ArrayList)
$null = $pathExclusions.Add($env:windir + '\Microsoft.NET')
$null = $pathExclusions.Add($env:windir + '\assembly')
#$null = $pathExclusions.Add($env:USERPROFILE + '\Downloads\HeidiSQL_11.3_64_Portable')
$null = $pathExclusions.Add($env:USERPROFILE + '\.dotnet')
$null = $pathExclusions.Add($env:USERPROFILE + '\.nuget')
@jhochwald
jhochwald / ModuleFast.ps1
Last active November 10, 2022 19:43 — forked from JustinGrote/ModuleFast.ps1
A high performance Powershell Gallery Module Installer
#requires -version 4.0
<#
.SYNOPSIS
High Performance Powershell Module Installation
.DESCRIPTION
This is a proof of concept for using the Powershell Gallery OData API and HTTPClient to parallel install packages
It is also a demonstration of using async tasks in powershell appropriately. Who says powershell can't be fast?
This drastically reduces the bandwidth/load against Powershell Gallery by only requesting the required data
@jhochwald
jhochwald / blocked
Last active November 10, 2022 19:42
Blocklist for Pi-hole
This file has been truncated, but you can view the full file.
0--e.info
0-100-195.btcc.com
0-100-pool.b3pool.com
0-100-pool.burst-alliance.org
0-100.burst-team.us
0-100.burst.wickedmine.com
0-100pool.burstcoin.ro
0-219215.btcc.com
0-29.com
0-41.btcc.com
@jhochwald
jhochwald / Test-IsAdmin.ps1
Created May 8, 2019 14:44
Check if PowerShell run elevated (e.g. as admin or not)
function Test-IsAdmin
{
<#
.SYNOPSIS
Check if PowerShell run elevated (e.g. as admin or not)
.DESCRIPTION
This is a complete new approach to check if the Shell runs elevated or not.
It runs on PowerShell and PowerShell Core, and it supports macOS or Linux as well.