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:
@@ -1,6 +1,25 @@
|
||||
# Minimal PC data collection script
|
||||
# For locked-down PCs with restricted permissions
|
||||
|
||||
# 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
|
||||
|
||||
$apiUrl = "https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp"
|
||||
$logFile = "$env:TEMP\shopdb-update.log"
|
||||
|
||||
@@ -149,6 +168,7 @@ try {
|
||||
"^0612$" = "Part Marker" # Part markers
|
||||
"^0613$" = "Part Marker" # Part markers
|
||||
"^0615" = "Part Marker" # Part markers
|
||||
"^8003$" = "Part Marker" # Part markers
|
||||
"^TEST" = $null # Test machines - no type hint
|
||||
"^TEMP" = $null # Temporary - no type hint
|
||||
"^DEFAULT"= $null # Default value - no type hint
|
||||
|
||||
Reference in New Issue
Block a user