Skip to content

Instantly share code, notes, and snippets.

$rra = [System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]]::new()
$ra = [Microsoft.Open.AzureAD.Model.RequiredResourceAccess]::new()
$ra.ResourceAppId = "00000003-0000-0000-c000-000000000000" # graph
$ra.ResourceAccess = [Microsoft.Open.AzureAD.Model.ResourceAccess]::new("e1fe6dd8-ba31-4d61-89e7-88639da4683d", "Scope") # User.Read
$rra.Add($ra)
$ra = [Microsoft.Open.AzureAD.Model.RequiredResourceAccess]::new()
$ra.ResourceAppId = "00000007-0000-0000-c000-000000000000" # CDS / Dynamics CRM
$ra.ResourceAccess = [Microsoft.Open.AzureAD.Model.ResourceAccess]::new("78ce3f0f-a1ce-49c2-8cde-64b5c0896db4", "Scope") #user_impersonation
@matejskubic
matejskubic / MsDyn365FO-OnPrem-ServiceFabric-LocalAgent.sql
Created October 10, 2020 11:48
Dynamics Finance & Operations - Local data agent diagnostics
select top 100 *
from DeploymentInstanceArtifact
select top 100 *
from OrchestratorCommand
order by QueuedDateTime desc
select top 100 *
from OrchestratorJob
@matejskubic
matejskubic / WindowsCredentialVault.psm1
Created June 8, 2020 12:06 — forked from guitarrapc/WindowsCredentialVault.psm1
PowerShell Windows Credential Vault Module
function InitializeWindowsCredential
{
Write-Verbose ("Loading PasswordVault Class.")
[void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
}
InitializeWindowsCredential
function ConvertTo-PasswordCredential
{
@matejskubic
matejskubic / tsql-log-analysis.sql
Last active May 14, 2020 10:13
inspect / analyse sql transaction log
SELECT
--TOP 100
AllocUnitName,
Operation,
COUNT(*) c,
SUM([Log Record Length]) l
FROM sys.fn_dblog(NULL,NULL)
GROUP BY
AllocUnitName,
Operation
@matejskubic
matejskubic / msdyn365fo-build.ps1
Created October 9, 2018 12:10
MSDYN365FO Build and create deployable package
$srcDir="c:\Temp\ax-build\src\" # source packages in c:\Temp\ax-build\Metadata\
$Build_BuildNumber = "0.0.1"
$binDir=(mkdir -Force (Join-Path $srcDir "..\bin\")).FullName
$Build_SourcesDirectory = Join-Path $srcDir "Metadata"
$PackagingExclusions = ""
pushd $srcDir
$Agent_BuildDirectory=$binDir
@matejskubic
matejskubic / transformXliff-2-LabetTxt.xslt
Created July 17, 2018 14:39
Transform Dynamics 365 Finance and Operations XLIFF translations to txt #msdyn365fo
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
>
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="xliff:xliff/xliff:file/xliff:body/xliff:group/xliff:trans-unit"/>
</xsl:template>
<xsl:template match="xliff:trans-unit">
@matejskubic
matejskubic / pootle_state_update.sql
Created June 27, 2018 09:23
Update pootle translation unit to translated for units already translated by user
-- UPDATE pootle_store_unit su SET state=200
SELECT * FROM pootle_store_unit su
WHERE EXISTS
(
SELECT *
FROM pootle_app_submission asub
WHERE new_value=200 AND submitter_id=7 AND field=3
AND asub.unit_id=su.id
)
AND su.state=50
https://moakt.com
https://www.mailinator.com
https://www.guerrillamail.com/
https://temp-mail.org/en/
https://tempmail.net/
https://www.10minutemail.com
http://www.yopmail.com/en/
http://www.tempinbox.com/