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
It 'creates paragraph with embedded new line' { | |
$expected = '<div>Embedded<br />New Line</div>'; | |
$paragraphText = 'Embedded{0}New Line' -f [System.Environment]::NewLine | |
$result = Paragraph $paragraphText | OutHtmlParagraph; | |
$result | Should BeExactly $expected; | |
} | |
It 'creates a tabular table cell with an embedded new line' { | |
$licenses = 'Standard{0}Professional{0}Enterprise' -f [System.Environment]::NewLine |
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
configuration XD7StoreFrontStore | |
{ | |
param ( | |
[Parameter(Mandatory = $true)] | |
[System.String] | |
$StoreName, | |
[Parameter(Mandatory = $true)] | |
[ValidateSet("Explicit", "Anonymous")] | |
[System.String] |
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
[{ | |
"Id": "WIN10_x64_Enterprise_1809_EN_Eval", | |
"Filename": "WIN10_x64_ENT_RS5_EN_Eval.iso", | |
"Description": "Windows 10 64bit Enterprise 1809 English Evaluation", | |
"Architecture": "x64", | |
"ImageName": "Windows 10 Enterprise Evaluation", | |
"MediaType": "ISO", | |
"OperatingSystem": "Windows", | |
"Uri": "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", | |
"Checksum": "89AB238E51F0AF6E72C8B7115DE03154", |
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
## Prerequisites | |
## OneDrive configured and synchronised for Documents redirection | |
Enable-MicrosoftUpdate | |
Move-LibraryDirectory -libraryName Personal -NewPath ~\OneDrive\Documents | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -DisableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess -EnableExpandToOpenFolder | |
Update-ExecutionPolicy -Policy RemoteSigned | |
choco install Microsoft-Hyper-V-All --source windowsFeatures -y |
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
C:\Windows\system32>choco list --local-only | |
Chocolatey v0.10.8 | |
chocolatey 0.10.8 | |
1 packages installed. | |
C:\Windows\system32>choco install "C:\Users\Administrator\Documents\citrix-receiver.4.11.nupkg" | |
The use of .nupkg or .nuspec in for package name or source is known to cause issues. Please use the package id from the nuspec `<id />` with `-s .` (for local folder where nupkg is found). | |
Chocolatey v0.10.8 | |
Installing the following packages: | |
C:\Users\Administrator\Documents\citrix-receiver.4.11.nupkg |
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
#requires -RunAsAdministrator | |
#requires -Version 5 | |
<# | |
For the PowerShell Desired State Configuration 101 Workshop you will need | |
the following: | |
1. A Windows 2016 virtual machine. This can be any hypervisor you have | |
available e.g. Hyper-V, VMware Workstation or VirtualBox. |
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
function Find-CumulativeWindowsUpdate { | |
<# | |
.SYNOPSIS | |
Finds the latest Windows 10/Server 2016 cumulative update(s). | |
.EXAMPLE | |
Find-CumulativeWindowsUpdate | |
KB Description Uri | |
-- ----------- --- |
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
Function Format-Pester { | |
<# | |
.SYNOPSIS | |
Document Pester's tests results into the selected format (HTML, Word, Text). | |
.DESCRIPTION | |
Create documents in formats: HTML, Word, Text using PScribo PowerShell module. Documents are preformated to be human friendly. | |
Local Word installation is not needed to be installed on the computers were documents. | |
Additional languages (other than en-US) can be used - please read info for translator on the project web page. |
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
<# | |
## String comparison that will return the incorrect result | |
'1.9' -gt '1.10' | |
True | |
## Casting to [System.Version] compares successfully | |
[version]'1.9' -gt [version]'1.10' | |
False |
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
<# | |
To download the latest version of a module, use https://www.powershellgallery.com/api/v2/package/<ModuleName> | |
e.g. https://www.powershellgallery.com/api/v2/package/dbatools | |
To download a specific module version, use https://www.powershellgallery.com/api/v2/package/<ModuleName>/<ModuleVersion> | |
e.g. https://www.powershellgallery.com/api/v2/package/dbatools/0.8.948 | |
#> | |
NewerOlder