This file contains 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
<# | |
.SYNOPSIS | |
This is a helper script to launch Deploy-Application.exe via ServiceUI to force the process to become visible when deployed by Intune, or other deployment systems that run in session 0. | |
.DESCRIPTION | |
By default it will invoke ServiceUI if explorer.exe is running and the current process is non-interactive. An alternate ProcessName can be specified if you only want the toolkit to be visible when a specific application is running. | |
There are x86 and x64 builds of ServiceUI avaiable in MDT under 'Microsoft Deployment Toolkit\Templates\Distribution\Tools'. Rename these to ServiceUI_x86.exe and ServiceUI_x64.exe and place them with this script in the root of the toolkit next to Deploy-Application.exe. | |
.PARAMETER ProcessName | |
Specifies the name of the process check for to trigger the interactive installation. Default value is 'explorer'. Multiple values can be supplied such as 'app1','app2'. The .exe extension must be omitted. | |
.PARAMETER DeploymentType | |
Specifies the type of deployment. Valid values are 'In |
This file contains 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
$ProgressPreference = 'SilentlyContinue' | |
try { | |
$Version = ((Invoke-WebRequest 'https://www.microsoft.com/download/details.aspx?id=58494' -UseBasicParsing).Content | Select-String -Pattern 'Version:\s+</div><p>(.+)</p>').Matches.Groups[1].Value | |
$URL32 = ((Invoke-WebRequest 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=58494' -UseBasicParsing).Links | Where-Object href -like '*PBIDesktopSetup_x64.exe')[0].href | |
$URL64 = ((Invoke-WebRequest 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=58494' -UseBasicParsing).Links | Where-Object href -like '*PBIDesktopSetup.exe')[0].href | |
if ($Version -and $URL32) { | |
[PSCustomObject]@{ | |
Version = $Version |
This file contains 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 Play-Game { | |
param ([bool]$Swap) | |
$Doors = 1,2,3 | |
$PrizeDoor = Get-Random $Doors | |
$MyDoor = Get-Random $Doors | |
[array]$RemovableDoors = $Doors | Where {$_ -ne $MyDoor -and $_ -ne $PrizeDoor} | |
$RemovedDoor = Get-Random $RemovableDoors | |
$RemainingDoor = $Doors | Where {$_ -ne $MyDoor -and $_ -ne $RemovedDoor} |
This file contains 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
Install-BoxstarterPackage -PackageName audacity-lame -DisableReboots |