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
'use strict' | |
const log = require('npmlog') | |
const execFile = require('child_process').execFile | |
const fs = require('fs') | |
const path = require('path').win32 | |
const logWithPrefix = require('./util').logWithPrefix | |
const regSearchKeys = require('./util').regSearchKeys | |
function findVisualStudio (nodeSemver, configMsvsVersion, callback) { |
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
public class CertificateHelper | |
{ | |
public static X509Certificate2 FindCertificateByThumbprint(string thumbrint) | |
{ | |
X509Certificate2 cert; | |
cert = FindCertificateByThumbprint(thumbrint, StoreName.My, StoreLocation.CurrentUser); | |
if (cert == null) | |
{ | |
cert = FindCertificateByThumbprint(thumbrint, StoreName.My, StoreLocation.LocalMachine); | |
} |
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
"resources": [ | |
{ | |
"apiVersion": "2018-11-01", | |
"name": "[parameters('appService_name')]", | |
"type": "Microsoft.Web/sites", | |
"kind": "WebApp", | |
"location": "[parameters('appServicePlan_location')]", | |
"identity": { | |
"type": "UserAssigned", | |
"userAssignedIdentities": { |
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
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | |
WebHost.CreateDefaultBuilder(args) | |
.ConfigureAppConfiguration((context, config) => | |
{ | |
var builtConfig = config.Build(); | |
var userAssignedId = builtConfig["UserAssignedId"]; | |
AzureServiceTokenProvider azureServiceTokenProvider; | |
if (string.IsNullOrEmpty(userAssignedId)) |
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
private static IKeyVaultClient CreateKeyVaultWithManagedIdentity(string userIdentityId) | |
{ | |
AzureServiceTokenProvider azureServiceTokenProvider; | |
if (!string.IsNullOrEmpty(userIdentityId)) | |
{ | |
// use User Managed Identity | |
azureServiceTokenProvider = new AzureServiceTokenProvider($"RunAs=App;AppId={userIdentityId}"); | |
} else | |
{ | |
// use System Managed Identity |
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
Export settings for EliteReporter | |
Application->Settings | |
Executable to run on Export | |
powershell.exe | |
Arguments | |
"& ""C:\<path_to>\edboard_send_report.ps1""" -jsonFile $exportedFile |
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
Настройки для EliteReporter | |
Application->Settings | |
Executable to run on Export | |
powershell.exe | |
Arguments | |
"& ""E:\temp\elite_games_send_report.ps1""" -jsonFile $exportedFile |
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
#params to set | |
$userAccountName=someAlias | |
$baseDN="DC=corp,DC=company" | |
# get domain password expiration info, | |
$baseDS = New-Object system.DirectoryServices.DirectorySearcher([ADSI]"LDAP://$baseDN") | |
$dc = $baseDS.findone() | |
$maxPwdAgeInDays = convertTimeToDays ( $dc.properties.item("maxPwdAge")[0] ) | |
# find user |