Consolidate all PowerShell scripts and fix production issues
Scripts added to shopdb/scripts/: - Backup-GERegistry.ps1 - Get-InstalledApps.ps1 - Install-AssetCollectionSchedule.ps1 - Setup-WinRM.ps1 - Test-API-Connection.ps1 Updates to existing scripts: - Update-PC-Minimal.ps1: Added SSL bypass, added 8003 to Part Marker machines - Update-ShopfloorPCs-Remote.ps1: Added SSL bypass, added 8003 to Part Marker machines Part Marker machine numbers now include: 0612, 0613, 0615, 8003 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,25 @@ param(
|
||||
[switch]$WhatIf
|
||||
)
|
||||
|
||||
# SSL/TLS Certificate Bypass for HTTPS connections
|
||||
try {
|
||||
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy').Type) {
|
||||
Add-Type @"
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
public class TrustAllCertsPolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult(
|
||||
ServicePoint srvPoint, X509Certificate certificate,
|
||||
WebRequest request, int certificateProblem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
"@
|
||||
}
|
||||
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
|
||||
} catch { }
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
#region Functions
|
||||
|
||||
function Write-Log {
|
||||
@@ -408,6 +427,7 @@ function Get-RemotePCInfo {
|
||||
"^0612$" = "Part Marker" # Part markers
|
||||
"^0613$" = "Part Marker" # Part markers
|
||||
"^0615" = "Part Marker" # Part markers
|
||||
"^8003$" = "Part Marker" # Part markers
|
||||
"^TEST" = $null # Test machines
|
||||
"^TEMP" = $null # Temporary
|
||||
"^DEFAULT"= $null # Default value
|
||||
|
||||
Reference in New Issue
Block a user