Skip to content

Instantly share code, notes, and snippets.

View jikuja's full-sized avatar

Janne Kujanpää jikuja

  • Espoo
  • 04:04 (UTC +03:00)
View GitHub Profile
@jikuja
jikuja / README.md
Last active June 4, 2023 13:10
Convert font glyphs to SVGs
fontforge -lang=ff -c 'Open($1);SelectAll();UnlinkReference();Export($2);' "$FONT" "${OUTPUT}/%n_%e.svg"
@jikuja
jikuja / MMA-notes.md
Created March 29, 2023 08:44
Notes for MMA
$mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg'
$mma.GetCloudWorkspaces()
$workspaceId = "<Your workspace Id>"
$workspaceKey = "<Your workspace Key>"
$mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg'
$mma.AddCloudWorkspace($workspaceId, $workspaceKey)
@jikuja
jikuja / README.md
Last active February 6, 2023 16:47
Hidden powershell features
@jikuja
jikuja / gist:179d38a636e1cac871f361e6182e79f8
Created February 6, 2022 16:17
sqlcmd cross-platform mess
# Sqlcmd
Sqlcmd is a simple tool for SQL Server automation
## The mess
### Missing features on Windows
Access token based Azure AD authentication is not supported:
@jikuja
jikuja / README.md
Created October 14, 2021 11:28
Azure VM, Azure Virtual Desktop, domain, auth with Azure AD accounts

AD DS

  • Password hashes generated after AD DS creation
  • Synchronized credential information in Azure AD can't be re-used if you later create a managed domain - you must reconfigure the password hash synchronization to store the password hashes again. Previously domain-joined VMs or users won't be able to immediately authenticate - Azure AD needs to generate and store the password hashes in the new managed domain.
  • Azure AD Connect vs Azure AD Connect Cloud Sync
  • https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-password-hash-synchronization#password-hash-sync-process-for-azure-ad-domain-services
  • The steps to generate and store these password hashes are different for cloud-only user accounts created in Azure AD versus user accounts that are synchronized from your on-premises directory using Azure AD Connect.
  • Scoped synchronozation
    • By groups
  • Cipher selection
@jikuja
jikuja / README.md
Last active October 4, 2021 11:24
Bicep - resource related information

Resource functions

reference

  • reference(resourceName or resourceIdentifier, [apiVersion], ['Full'])
  • Returns an object representing a resource's runtime state.

resourceId

  • resourceId([subscriptionId], [resourceGroupName], resourceType, resourceName1, [resourceName2], ...)
@jikuja
jikuja / README.md
Last active March 14, 2023 15:40
Powershell & Azure AD
@jikuja
jikuja / README.md
Last active September 30, 2021 09:44
Azure VPN notes

Azure VPN limitations / features

Feature Basic + Policy Basic + Route VpnGw1 + Route
Bandwidth 100 Mbps 100 Mbsp 650 Mbps
Tunnels Only one tunnel max. 10 tunnels max. 30 tunnels
IKE for S2S Only IKEv1 Only IKEv2(*) IKEv1 and IKEv2
P2S No Only SSTP IKEv2 IPSEC, OpenVPN or SSTP
P2S auth - Certificate Certificate, RADIUS, AAD
IPSEC conf N/A N/A Possible to change ciphers
@jikuja
jikuja / README.md
Last active September 17, 2024 07:22
Azure AD access review snippets

List all Azure resource access/role assingments

Get-AzRoleAssignment | Sort-Object { $_.Scope} | Format-Table -Property @{ e='DisplayName'; width=30}, @{ e='SignInName'; width=70}, @{ e='RoleDefinitionName'; width=30}, @{ e='Description'; width=30}, ObjectType -GroupBy Scope | Out-String -Stream -Width 200
  • Using Sort-Object { $_.Scope} ensures correct order for / and for /subscriptions/abcdefgh-0123-0123-0123-abcdefghijkl scopes
  • Format-Table is used to select required properties and format the output
  • Out-String -Stream -Width 200 is used to ensure that output is wide enough

Variation: List direct user assignemnts

@jikuja
jikuja / README.md
Last active June 17, 2021 10:47
Notes about Azure pipelines

Trigger directives

CI trigger with templates

trigger: none is ignored on template files. Must be used on pipeline level.

Untested if true for other CI triggers and filtering.

Build completion trigger