Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #13

Merged
merged 3 commits into from
Mar 18, 2024
Merged

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-avd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
$AzureRegionName = "${{ secrets.AZUREREGIONNAME }}"
$SecureVars = @{ VariablesList = "${{ secrets.VARIABLESLIST }}" }

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion optimise/Invoke-ImageOptimise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fEnab
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /f | Out-Null

# Trust the PSGallery for modules
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Install-PackageProvider -Name "NuGet" -MinimumVersion "2.8.5.208" -Force -ErrorAction "SilentlyContinue"
Install-PackageProvider -Name "PowerShellGet" -MinimumVersion "2.2.5" -Force -ErrorAction "SilentlyContinue"
foreach ($Repository in "PSGallery") {
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/011_SupportFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Runs the script to install the required PowerShell modules for building AVD imag

#region Script logic
# Trust the PSGallery for modules
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Install-PackageProvider -Name "NuGet" -MinimumVersion "2.8.5.208" -Force -ErrorAction "SilentlyContinue"
#Install-Module -Name PowerShellGet -Force -AllowClobber
Install-PackageProvider -Name "PowerShellGet" -MinimumVersion "2.2.5" -Force -ErrorAction "SilentlyContinue"
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/013_RegionLanguage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/015_Customise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
46 changes: 46 additions & 0 deletions scripts/image/101_Avd-AgentMicrosoftWvdMultimediaRedirection.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<#
.SYNOPSIS
Installs the latest Microsoft Azure Virtual Desktop agents.

.DESCRIPTION
This script installs the Microsoft Azure Virtual Desktop agents,
including Microsoft Azure Virtual Desktop Multimedia Redirection Extensions.

.PARAMETER Path
The path where the agents will be downloaded. The default path is "$Env:SystemDrive\Apps\Microsoft\Avd".

.NOTES
- Requires the "Evergreen" module.
- Requires administrative privileges.
- This script is intended for use in an Azure Virtual Desktop environment.
#>

#execution mode: Combined
#tags: Evergreen, Microsoft, AVD
#Requires -Modules Evergreen
[System.String] $Path = "$Env:SystemDrive\Apps\Microsoft\Avd"

#region Script logic
New-Item -Path $Path -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null
New-Item -Path "$Env:ProgramData\Nerdio\Logs" -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null

# Run tasks/install apps
#region Microsoft Azure Virtual Desktop Multimedia Redirection Extensions
Import-Module -Name "Evergreen" -Force
$App = Get-EvergreenApp -Name "MicrosoftWvdMultimediaRedirection" | Select-Object -First 1
$OutFile = Save-EvergreenApp -InputObject $App -CustomPath $Path -WarningAction "SilentlyContinue"

# Install MMR
Write-Information -MessageData ":: Install Microsoft Azure Virtual Desktop Multimedia Redirection Extensions" -InformationAction "Continue"
$LogFile = "$Env:ProgramData\Nerdio\Logs\MicrosoftWvdMultimediaRedirection$($App.Version).log" -replace " ", ""
$params = @{
FilePath = "$Env:SystemRoot\System32\msiexec.exe"
ArgumentList = "/package `"$($OutFile.FullName)`" /quiet /log $LogFile"
NoNewWindow = $true
Wait = $true
PassThru = $true
ErrorAction = "Continue"
}
$result = Start-Process @params
Write-Information -MessageData ":: Install exit code: $($result.ExitCode)" -InformationAction "Continue"
#endregion
46 changes: 46 additions & 0 deletions scripts/image/101_Avd-AgentMicrosoftWvdRtcService.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<#
.SYNOPSIS
Installs the latest Microsoft Azure Virtual Desktop agents.

.DESCRIPTION
This script installs the Microsoft Azure Virtual Desktop agents,
including the Microsoft Remote Desktop WebRTC Redirector Service

.PARAMETER Path
The path where the agents will be downloaded. The default path is "$Env:SystemDrive\Apps\Microsoft\Avd".

.NOTES
- Requires the "Evergreen" module.
- Requires administrative privileges.
- This script is intended for use in an Azure Virtual Desktop environment.
#>

#execution mode: Combined
#tags: Evergreen, Microsoft, AVD
#Requires -Modules Evergreen
[System.String] $Path = "$Env:SystemDrive\Apps\Microsoft\Avd"

#region Script logic
New-Item -Path $Path -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null
New-Item -Path "$Env:ProgramData\Nerdio\Logs" -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null

# Run tasks/install apps
#region Microsoft Remote Desktop WebRTC Redirector Service
Import-Module -Name "Evergreen" -Force
$App = Get-EvergreenApp -Name "MicrosoftWvdRtcService" | Where-Object { $_.Architecture -eq "x64" } | Select-Object -First 1
$OutFile = Save-EvergreenApp -InputObject $App -CustomPath $Path -WarningAction "SilentlyContinue"

# Install RTC
Write-Information -MessageData ":: Install Microsoft Remote Desktop WebRTC Redirector Service" -InformationAction "Continue"
$LogFile = "$Env:ProgramData\Nerdio\Logs\MicrosoftWvdRtcService$($App.Version).log" -replace " ", ""
$params = @{
FilePath = "$Env:SystemRoot\System32\msiexec.exe"
ArgumentList = "/package `"$($OutFile.FullName)`" /quiet /log $LogFile"
NoNewWindow = $true
Wait = $true
PassThru = $true
ErrorAction = "Continue"
}
$result = Start-Process @params
Write-Information -MessageData ":: Install exit code: $($result.ExitCode)" -InformationAction "Continue"
#endregion
83 changes: 0 additions & 83 deletions scripts/image/101_Avd-Agents.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/image/102_MicrosoftFSLogixApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Import-Module -Name "Evergreen" -Force

#region Use Secure variables in Nerdio Manager to pass a JSON file with the variables list
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/201_MicrosoftTeams.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/201_MicrosoftTeamsClassic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
[System.String] $Language = "en-AU"
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/202_Microsoft365Apps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
"@
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/400_AdobeAcrobatReaderDC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/401_FoxitPDFReader.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
[System.String] $Language = "English"
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/412_MozillaFirefox.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
[System.String] $Channel = "LATEST_FIREFOX_VERSION"
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/414_Greenshot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Get-Process -ErrorAction "SilentlyContinue" | `
Stop-Process -Force -ErrorAction "SilentlyContinue"

# Download the default settings
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/415_FoxitPDFEditor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
[System.String] $Language = "English"
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/417_CitrixWorkspaceApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
[System.String] $Stream = "Current"
}
else {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/others/Get-VariablesList.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/Install-Pester.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#tags: Pester, Testing, DevOps

# Trust the PSGallery for modules
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Install-PackageProvider -Name "NuGet" -MinimumVersion "2.8.5.208"
Install-PackageProvider -Name "PowerShellGet" -MinimumVersion "2.2.5"
if (Get-PSRepository | Where-Object { $_.Name -eq $Repository -and $_.InstallationPolicy -ne "Trusted" }) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Install-Modules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#>

# Trust the PSGallery for modules
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Install-PackageProvider -Name "NuGet" -MinimumVersion "2.8.5.208"
Install-PackageProvider -Name "PowerShellGet" -MinimumVersion "2.2.5"
if (Get-PSRepository | Where-Object { $_.Name -eq $Repository -and $_.InstallationPolicy -ne "Trusted" }) {
Expand Down
2 changes: 1 addition & 1 deletion tmp/011_SupportFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#region Script logic
# Trust the PSGallery for modules
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Install-PackageProvider -Name "NuGet" -MinimumVersion "2.8.5.208" -Force -ErrorAction "SilentlyContinue"
#Install-Module -Name PowerShellGet -Force -AllowClobber
Install-PackageProvider -Name "PowerShellGet" -MinimumVersion "2.2.5" -Force -ErrorAction "SilentlyContinue"
Expand Down
2 changes: 1 addition & 1 deletion tmp/013_RegionLanguage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion tmp/015_Customise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion tmp/102_MicrosoftFSLogixApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ try {

#region Use Secure variables in Nerdio Manager to pass a JSON file with the variables list
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion tmp/400_AdobeAcrobatReaderDC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion tmp/414_Greenshot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ try {
Stop-Process -Force -ErrorAction "SilentlyContinue"

# Download the default settings
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
2 changes: 1 addition & 1 deletion tmp/417_CitrixWorkspaceApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
Expand Down
Loading
Loading