Conversation
Enables memory integrity for devices that support it. This improves protection against rootkits etc.
Shortened the banner because it was a little long.
|
|
||
| # Clear screen and show banner and warning | ||
| Clear-Host | ||
| Write-Host "============================================================" -ForegroundColor Cyan |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| # Clear screen and show banner and warning | ||
| Clear-Host | ||
| Write-Host "============================================================" -ForegroundColor Cyan | ||
| Write-Host " Windows Deployment Automation Toolkit" -ForegroundColor Yellow |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Clear-Host | ||
| Write-Host "============================================================" -ForegroundColor Cyan | ||
| Write-Host " Windows Deployment Automation Toolkit" -ForegroundColor Yellow | ||
| Write-Host "============================================================" -ForegroundColor Cyan |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Write-Host " Windows Deployment Automation Toolkit" -ForegroundColor Yellow | ||
| Write-Host "============================================================" -ForegroundColor Cyan | ||
| if ($version) { | ||
| Write-Host "Version: $version" -ForegroundColor Green |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| if ($version) { | ||
| Write-Host "Version: $version" -ForegroundColor Green | ||
| } | ||
| Write-Host "" |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Write-Host "Right click to resume" -ForegroundColor Green | ||
| Write-Host "CTRL + C to cancel" -ForegroundColor Red | ||
| Write-Host "" | ||
| Write-Host "=========================================" -ForegroundColor Cyan |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Write-Host "CTRL + C to cancel" -ForegroundColor Red | ||
| Write-Host "" | ||
| Write-Host "=========================================" -ForegroundColor Cyan | ||
| Write-Host "" |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
|
|
||
| # Countdown before starting | ||
| for ($i = 15; $i -gt 0; $i--) { | ||
| Write-Host "`rStarting deployment in $i seconds... (Press CTRL+C to cancel)" -ForegroundColor Yellow -NoNewline |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Write-Host "`rStarting deployment in $i seconds... (Press CTRL+C to cancel)" -ForegroundColor Yellow -NoNewline | ||
| Start-Sleep -Seconds 1 | ||
| } | ||
| Write-Host "`rStarting deployment now! " -ForegroundColor Green |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
| Start-Sleep -Seconds 1 | ||
| } | ||
| Write-Host "`rStarting deployment now! " -ForegroundColor Green | ||
| Write-Host "" |
Check warning
Code scanning / PSScriptAnalyzer
File 'Deploy.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
[0.5.5] - 2025-11-20
Added
Changed