Skip to content

A PowerShell Module containing a collection of scripts that interact with Sitecore Azure PaaS via Kudu

Notifications You must be signed in to change notification settings

strezag/sitecore-azure-kudu-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sitecore Azure Kudu Tools PowerShell Module Inline docs

SAKT

A collection of commands to obtain information from Sitecore instances on Azure PaaS via Kudu.

Open for contributions! contributions welcome

View Docs

Installation Inline docs

PowerShell Gallery

PowerShell Gallery

Install-Module -Name SitecoreAzureKuduTools

Functions Inline docs

Get-SitecoreFileBackup function-badge

Download full App Service file contents.

This function will download all files from in a given Resource.

Syntax

Get-SitecoreFileBackup [-ResourceSubscriptionId] <String> [-ResourceGroupName] <String> [-ResourceName] <String>
[<CommonParameters>]

Parameters

Name Alias Required? Pipeline Input
-ResourceSubscriptionId ID true false
-ResourceGroupName Group true false
-ResourceName Name true false
-DestinationPath Path false false

Examples

EXAMPLE 1
Get-SitecoreFileBackup -ResourceSubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"  -ResourceGroupName "xx-xxxxxxxxxx-XP2-SMALL-PRD1" -ResourceName "xx-xxxxxxxxxx-xp2-small-prd1-cd"
EXAMPLE 2
Get-SitecoreFileBackup -ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"  -Group "xx-xxxxxxxxxx-XP2-SMALL-PRD1" -Name "xx-xxxxxxxxxx-xp2-small-prd1-cd"

Get-SitecoreSupportPackage function-badge

Remotely generate a Sitecore Support Package

This function will download and zip files defined for Sitecore Support Packages:
https://kb.sitecore.net/articles/406145
> \App_Config\*
> \Logs\*
> eventlog.xml
> Global.asax
> license.xml
> sitecore.version.xml
> Web.config

Syntax

Get-SitecoreSupportPackage [-ResourceSubscriptionId] <String> [-ResourceGroupName] <String> [-ResourceName] <String>
[-LogDaysBack] <Int32> [<CommonParameters>]

Parameters

Name Alias Required? Pipeline Input Default Value
-ResourceSubscriptionId ID true false
-ResourceGroupName Group true false
-ResourceName Name true false
-LogDaysBack LogDays true false 0
-DestinationPath Path false false

Examples

EXAMPLE 1
Get-SitecoreSupportPackage -ResourceSubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"  -ResourceGroupName "xx-xxxxxxxxxx-XP2-SMALL-PRD1" -ResourceName "xx-xxxxxxxxxx-xp2-small-prd1-cd" -LogDaysBack 1
EXAMPLE 2
Get-SitecoreSupportPackage -ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"  -Group "xx-xxxxxxxxxx-XP2-SMALL-PRD1" -Name "xx-xxxxxxxxxx-xp2-small-prd1-cd" -LogDays 1

Invoke-SitecoreThumbprintValidation function-badge

Verify Certificate Thumbprints across Sitecore Azure PaaS using Kudu

This function will download ConnectionStrings.config and AppSettings.config files from all App Services in a given
Resource Group, then display any certificate thumbprints discrepencies.

Syntax

Invoke-SitecoreThumbprintValidation [-ResourceSubscriptionId] <String> [-ResourceGroupName] <String>
[<CommonParameters>]

Parameters

Name Alias Required? Pipeline Input
-ResourceSubscriptionId ID true false
-ResourceGroupName Group true false
-DestinationPath Path false false

Examples

EXAMPLE 1
Invoke-SitecoreThumbprintValidation -ResourceSubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "xx-xxxxxxxxxx-XP2-SMALL-PRD1"
EXAMPLE 2
Invoke-SitecoreThumbprintValidation -ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Group "xx-xxxxxxxxxx-XP2-SMALL-PRD1"

Contribute contributions welcome

Local Setup

1 - Uninstall the PowerShell Gallery Module
Remove-Module SitecoreAzureKuduTools -Force -ErrorAction SilentlyContinue
Uninstall-Module SitecoreAzureKuduTools -Force -ErrorAction SilentlyContinue
2 - Clone the repository
3 - Open PowerShell as an Administrator and navigate to the root of the cloned repo.
4 - Add cloned repo path to PSModulePath environment variable.
[Environment]::SetEnvironmentVariable("PSModulePath", [Environment]::GetEnvironmentVariable("PSModulePath", "Machine") + ";$($(Get-Location).Path)", "Machine")
5 - Navigate to \SitecoreAzureKuduTools\1.0.2
cd .\SitecoreAzureKuduTools\1.0.2\
6 - Import the module
Import-Module .\SitecoreAzureKuduTools.psd1
7 - Verify functions are loading

Developing

Assign yourself an issue from the project
Fork the repo and submit a Pull Request when you're ready.

Tip

Reloading

When making changes, use the following command to reload the module:

Remove-Module SitecoreAzureKuduTools -Force | Clear-History | Import-Module SitecoreAzureKuduTools

About

A PowerShell Module containing a collection of scripts that interact with Sitecore Azure PaaS via Kudu

Resources

Stars

Watchers

Forks

Packages

No packages published