Skip to content

Instantly share code, notes, and snippets.

@machv
machv / deploy.md
Last active February 13, 2020 19:51
ER Local
@machv
machv / Office.md
Last active October 11, 2021 20:34
office 2016

Office Apps for Enterprise Deployment

Group Policy Objects

User

Policy Path Name Value Note
User Configuration\AT\Microsoft Office 2016\First Run\ Disable Office First Run on application boot Enabled
User Configuration\AT\Microsoft Office 2016\First Run\ Disable First Run Movie Enabled
User Configuration\AT\Microsoft Office 2016\Subscription Activation\ Automatically activate Office with federated organization credentials Enabled Needed when AD FS is used
@machv
machv / AppLocker.txt
Last active March 5, 2020 13:21
App Locker
• Name AppLocker
• Destination log Forwarded Events
• Type Source computer initiated
• Computer Groups “Domain Computers” (or custom group containing the computer accounts to accept events from).
• Events to collect:
o Logged Any time
o Event level Error, Warning, Information
o Event logs Microsoft-Windows-AppLocker/EXE and DLL
Microsoft-Windows-AppLocker/MSI and Script
Microsoft-Windows-AppLocker/Packaged app-Deployment
@machv
machv / README.md
Last active September 4, 2024 07:41
Azure AD Connect behind proxy server

How to run Azure AD Connect behind proxy server

In this scenario I am using two proxy servers:

  • User proxy - with authentication required for users
  • System proxy - for machine context without any authentication

Sample squid configuration is below together with PowerShell script to configure prerequisities (https://docs.microsoft.com/cs-cz/azure/active-directory/hybrid/how-to-connect-install-prerequisites#connectivity).

Do not make any changes to miiserver.exe.config. This file is overwritten on every upgrade so even if it works during initial install, the system stops working on first upgrade. For that reason, the recommendation is to update machine.config instead.

@machv
machv / search.json
Last active May 14, 2020 08:25
Edge JSON search
[
{
"is_default":true,
"name": "Google",
"keyword": "google.com",
"search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:iOSSearchLanguage}{google:searchClient}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}",
"suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client={google:suggestClient}&gs_ri={google:suggestRid}&xssi=t&q={searchTerms}&{google:inputType}{google:omniboxFocusType}{google:cursorPosition}{google:currentPageUrl}{google:pageClassification}{google:searchVersion}{google:sessionToken}{google:prefetchQuery}sugkey={google:suggestAPIKeyParameter}"
},
{
"name": "Bing",
@machv
machv / script.ps1
Created May 14, 2020 10:10
reg2xml
<# Added by Michael Pietroforte #>
Param(
[Parameter(Mandatory=$True)][string]$regPath,
[Parameter(Mandatory=$True)][string]$xmlPath
)
<#
Orginal script by Malcolm McCaffery
More info at the http://chentiangemalc.wordpress.com/2014/07/02/importing-reg-files-into-group-policy-preferences/
#>
https://support.microsoft.com/en-us/help/4561494/microsoft-edge-application-creation-fails-in-configuration-manager
@machv
machv / new-vm.ps1
Last active April 21, 2022 07:54
vm ps
$vmRootDir = "D:\Virtual Machines"
$LibraryPath = "C:\Data\Parent Disks"
$vSwitchName = "VM"
$MountDir = "C:\Data\MountDir" #cannot be CSV
$ServerName = ""hv01
$VMs = @()
$VMs += @{
VMName = "VM01"
MemoryStartupBytes = 512MB
#region create AAD app
# based on https://docs.microsoft.com/en-us/powershell/partnercenter/secure-app-model?view=partnercenterps-1.5
$DisplayName = "MFA Status Ingester"
Connect-AzureAD
$adAppAccess = [Microsoft.Open.AzureAD.Model.RequiredResourceAccess]@{
ResourceAppId = "00000002-0000-0000-c000-000000000000";
ResourceAccess =
[Microsoft.Open.AzureAD.Model.ResourceAccess]@{
@machv
machv / flow.md
Created June 9, 2020 13:17
RC -> Datum narozeni (PowerAutomate)

Clean RC expression

Type: Data Operation Action: Compose

Expression:

replace(replace(outputs('RC'), '/', ''), ' ', '')

Datum narozeni expression