This file contains hidden or 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
select | |
'ALTER TABLE [' + TABLE_NAME + '] DROP CONSTRAINT [' + CONSTRAINT_NAME + ']' | |
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS |
This file contains hidden or 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
SELECT mf.name, | |
mf.VersionMajor, | |
mf.VersionMinor, | |
mf.VersionBuildNo, | |
mf.VersionRevision, | |
COUNT(*) AS 'Element count' | |
FROM modelelementdata med | |
JOIN modelmanifest mf ON mf.modelid = med.modelid | |
WHERE mf.VersionBuildNo BETWEEN 1000 AND 3999 | |
GROUP BY mf.name, |
This file contains hidden or 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
anytype a10 = element.args().dataset(); | |
anytype a10str = tableId2name(element.args().dataset()); | |
anytype a11 = element.args().record(); | |
anytype a12 = element.args().refField(); | |
anytype a12str = fieldId2name(element.args().dataset(), element.args().refField()); | |
anytype a13 = element.args().selectField(); | |
anytype a13str = fieldId2name(element.args().dataset(), element.args().selectField()); | |
anytype a20 = element.args().lookupTable(); | |
anytype a20str = tableId2name(element.args().lookupTable()); |
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
netsh wlan show profiles | |
netsh wlan show profiles name="%1" key=clear |
This file contains hidden or 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
### Reference: http://deploymentresearch.com/Research/Post/578/Building-the-perfect-Windows-Server-2016-reference-image | |
$ISO = "C:\Setup\ISO\Windows Server 2016.iso" | |
$CU = "C:\Setup\Cumulative Update for Windows Server 2016 for x64-based Systems (KB3201845)\AMD64-all-windows10.0-kb3201845-x64_95e1e765344e1388fee3f7c0c143499e0b617d9f.msu" | |
$MountFolder = "C:\Mount" | |
$RefImage = "C:\Setup\REFWS2016-001.wim" | |
# Verify that the ISO and CU files existnote | |
if (!(Test-Path -path $ISO)) {Write-Warning "Could not find Windows Server 2016 ISO file. Aborting...";Break} | |
if (!(Test-Path -path $CU)) {Write-Warning "Cumulative Update for Windows Server 2016. Aborting...";Break} | |
This file contains hidden or 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
DECLARE @dbToBackup as sysname = 'AxDB' | |
DECLARE @container as nvarchar(50) = lower(HOST_NAME()) | |
DECLARE @file as nvarchar(100) = @dbToBackup + N'_' + FORMAT(GETDATE(), N'yyyy-MM-dd_hhmmss') + N'.bak' | |
DECLARE @destUrl as nvarchar(500) = N'https://storageaccount.blob.core.windows.net/' + @container + N'/' + @file | |
PRINT @destUrl | |
BACKUP DATABASE @dbToBackup TO | |
URL = @destUrl | |
WITH NOFORMAT, NOINIT, NAME = N'Ax-Full Database Backup', NOSKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10 | |
GO |
This file contains hidden or 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
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ assembly name="EnvDTE80" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="EnvDTE" #> | |
<#@ import namespace="EnvDTE80" #> | |
<#@ output extension=".cs" #> |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
.DESCRIPTION | |
#> | |
[CmdletBinding()] | |
Param( | |
# |