Skip to content

Instantly share code, notes, and snippets.

naveed-ahmad-biz

Block or report user

Report or block naveed-ahmad-biz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@naveed-ahmad-biz
naveed-ahmad-biz / HabitatSolutionScript.ps1
Created Mar 2, 2017 — forked from phaniav/HabitatSolutionScript.ps1
Updated the Visual Studio installation location using powershell environment variable
View HabitatSolutionScript.ps1
#paths to the project templates on your system
$global:classTemplate = "$env:VS140COMNTOOLS..\IDE\ProjectTemplatesCache\CSharp\Windows Root\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
$global:webTemplate = "$env:VS140COMNTOOLS..\IDE\ProjectTemplatesCache\CSharp\Web\1033\WebApplicationProject40\EmptyWebApplicationProject40.vstemplate"
#variable used to store the path for the empty Habitat folder
$global:helixPath =""
#empty variable used to store the solution name
$global:solutionName = ""
@naveed-ahmad-biz
naveed-ahmad-biz / parametersjson
Last active Nov 5, 2017
azuredeploy.parameters.json
View parametersjson
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"deploymentId": {
"value": "SitecoreXP1"
},
"location": {
"value": "East US"
},
View generatebase64
$fileContentBytes = get-content 'C:\path\to\cert.pfx' -Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes) | Out-File 'pfx-bytes.txt'
View xp1install.ps1
$licenseFile = "C:\azure\sitecore-azure-2.0\license.xml"
$ArmTemplateUrl = "https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore 9.0.0/XP/azuredeploy.json";
$ArmParametersPath = "C:\azure\sitecore-azure-2.0\xp\azuredeploy.parameters.json";
$RGName = "SitecoreXP1";
$DeploymentID = "SitecoreXP1"
$location = "East US";
Start-SitecoreAzureDeployment -location $location -Name $RGName -ArmTemplateUrl $ArmTemplateUrl -ArmParametersPath $ArmParametersPath -LicenseXmlPath $licenseFile
View nocertificate.txt
New-AzureRmResourceGroupDeployment : 6:18:47 PM - Resource Microsoft.Web/certificates 'sitecore-9cloud-auth' failed
with message '{
"Code": "NotFound",
"Message": "Cannot find Certificate with name sitecore-9cloud-auth.",
"Target": null,
"Details": [
{
"Message": "Cannot find Certificate with name sitecore-9cloud-auth."
},
{
View InvalidTemplateError.txt
New-AzureRmResourceGroupDeployment : 2:34:31 PM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource 'templateLinkBase' at line '28' and column '30' is not valid: The language expression property 'templateLink' doesn't
exist, available properties are 'template, parameters, mode, provisioningState'.. Please see https://aka.ms/arm-template-expressions for usage details.'.
At C:\azure\sitecore-azure-2.0\tools\Sitecore.Cloud.Cmdlets.psm1:112 char:35
+ ... eployment = New-AzureRmResourceGroupDeployment -Name $Name -ResourceG ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzureRmResourceGroupDeployment : The deployment validation failed
At C:\azure\sitecore-azure-2.0\tools\Sitecore.Cloud.Cmdlets.psm1:112 ch
View self-assigned-ssl.ps1
#generate certificate
$thumbprint = (New-SelfSignedCertificate `
-Subject "CN=$env:COMPUTERNAME @ Sitecore, Inc." `
-Type SSLServerAuthentication `
-FriendlyName "$env:USERNAME Certificate").Thumbprint
#export certificate with password
$certificateFilePath = "C:\Temp\$thumbprint.pfx"
Export-PfxCertificate `
-cert cert:\LocalMachine\MY\$thumbprint `
-FilePath "$certificateFilePath" `
@naveed-ahmad-biz
naveed-ahmad-biz / install.ps1
Created Nov 15, 2017
Sitecore 9 Install File
View install.ps1
#define parameters
$prefix = "xp0"
$PSScriptRoot = "C:\Resources"
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.sc"
$SolrUrl = "https://localhost:8989/solr"
$SolrRoot = "C:\data\Solr-6.6.1"
$SolrService = "Solr-6.6.1"
$SqlServer = "MYCOMPUTERNAME\SQLEXPRESS2016"
$SqlAdminUser = "sitecoreUser"
@naveed-ahmad-biz
naveed-ahmad-biz / sitecore-9-error.ps1
Created Nov 15, 2017
ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER
View sitecore-9-error.ps1
[WebDeploy]:[Path] C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe
Error Code: ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER
More Information: The SQL provider cannot run because of a missing dependency. Please make sure that Microsoft SQL Server Transact-SQL ScriptDom is installed. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER.
**********************
Command start time: 20171023170201
**********************
PS>TerminatingError(Invoke-CommandTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)"
>> TerminatingError(Invoke-CommandTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)"
>> TerminatingError(I
View Sitecore.Ship.Update.UpdatePackageRunner.cs
using (new SecurityDisabler())
{
bool flag;
DiffInstaller installer = new DiffInstaller(installationInfo.Action);
entries = installer.InstallPackage(installationInfo.Path, installationInfo.Mode, logger, new List<ContingencyEntry>(), "rollbackPackage.rlb", out flag, ref historyPath);
}
You can’t perform that action at this time.