In this first follow-up blog post of the Tridion Docs webinar 'Automating tasks in SDL Tridion Docs using PowerShell', I will share a short summary of the 'How to get started with Microsoft PowerShell' part of the webinar, the resources and the script used during this webinar.


What is PowerShell

  • A task-based command-line shell and scripting language from Microsoft
  • Harnesses the power of the .NET Framework, providing rich objects and a massive set of built-in functionality for taking control of your environments and applications


A cmdlet (pronounced "command-let"):

  • is a lightweight PowerShell script that performs a single function,
  • is expressed as a Verb-(Prefix)Noun pair (e.g. Get-Help, Get-AdUser),
  • has a .ps1 extension.   

PowerShell modules and packages

  • A collection of cmdlets can be grouped and made available over a versioned  module/package.
  • These modules can be managed as packages using e.g. PowerShellGet (a package manager for Windows PowerShell)
  • The packages can be made available on a public repository (e.g. or a private repository (e.g. Nexus).

Installing PowerShell

Using PowerShell

  • Most of the time needs to be run as Administrator
  • PowerShell ISE (Integrated Scripting Environment)
    Run commands and write, test, and debug scripts in a single Windows-based graphic user interface with multi-line editing, tab completion, syntax coloring, selective execution, context-sensitive help, ...
  • Execution (Security) Policy
    The execution policies let you determine the conditions under which PowerShell scripts are run (and configuration files are loaded)

Online resources

Webinar script

Inside the script, you will also find some comments and additional links to specific online resources.

# 0. PowerShell?
#    (*)
# 1. Installing PowerShell (version 5.1)
#    PowerShell 5.1 comes with Windows 10/Windows Server 2016 out-of-the-box.
#    Needs to be installed/upgraded on other Operating
#        (*)
$PSVersionTable # $ -> variable

# 2. PowerShell/PowerShell ISE (Integrated Scripting Environment)
#    .ps1
#    Intellisense/tab-completion/...
#    Command Add-on
#    Breakpoints


# 3. Execution (Security) Policy
#    (*)
#    (*)
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Set-Executionpolicy -Scope CurrentUser -ExecutionPolicy Unrestricted​

# 4. Verb-Noun Principle
#    The Philosophy Verb-Noun - (*)
#    Approved Verbs for Windows PowerShell Commands - (*)
#    Cmdlets Use Verb-Noun Names to Reduce Command Memorization
Start-Process # Start-Process notepad.exe
Get-Process   # Get-Process -Name notepad
Stop-Process  # Stop-Process -Name notepad
#    You can list all commands that include a particular noun/verb with the -Noun/-Verb parameter for Get-Command
Get-Command -Noun Process
Get-Command -Verb Get
#    Simular for e.g. services...
Get-Command -Noun Service

#    Get-Help/-? command #Message to download/update help
#    Update-Help
Get-Help Write-Host # Write-Host -?
Get-Help Write-Host -Detailed
Get-Help Write-Host -ShowWindow

# 5. Parameters
#    Cmdlets Use Standard Parameters
#    It is a developer guidance/encouragement to standardize parameter names (not guaranteed).
#    Intellisense/tab-completion (parameters names and values)
Get-Process -Name explorer
Get-Service -Name dhcp
# 6. Piping
#     Combining commands into pipelines in the PowerShell
#     (*)
Start-Process notepad.exe
Get-Process -Name notepad | Stop-Process
# 7. Package Management/Modules
#    Packages are served up by package providers, which are created from various sources.
#    By default, PowerShell comes with two package sources: and PSGallery.
#    Public: E.g. PowerShell Gallery vs Private repositories
Get-PackageProvider -? #PowerShellGet # Get-Help Get-PackageProvider -ShowWindow
Get-PackageSource -?                  # Get-Help Get-PackageSource -ShowWindow

Get-PSRepository -?                   # Get-Help Get-PSRepository -ShowWindow
#    Installed modules
Get-Module -ListAvailable
Get-Module -ListAvailable -Name WindowsUpdate
Get-Module -ListAvailable -Name ISHRemote

# Available modules (from defined PSRepositories) -> Nuget provider !
Find-Module -Name "ISH*" #Find-Module -Name "ISHRemote" -Repository  PSGallery

Install-Module -Name ISHRemote -Repository PSGallery -Scope CurrentUser
# NuGet provider is required to continue
# PowerShellGet requires NuGet provider version '' or newer to interact with NuGet-based repositories.
No Data
  • $core_v2_ui.GetResizedImageHtml($comment.User.AvatarUrl, 44, 44, "%{border='0px', alt=$comment.User.DisplayName, ResizeMethod='ZoomAndCrop'}")
    $core_v2_ui.UserPresence($comment.User.Id) $comment.User.DisplayName over 2019 years ago
    This comment is under review.
No Data