mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-31 13:50:15 +00:00
small changes
This commit is contained in:
1 parent
d65b7a5cd1
commit
9529181adb
2 files changed
+17
-134
No files matched your search
@@ -35,8 +35,12 @@ write-host 'Installing .Net Framework 3.5'
|
||||
Install-WindowsFeature -name NET-Framework-Core
|
||||
}
|
||||
|
||||
sl "C:\Program Files\Update Services\Tools"
|
||||
.\wsusutil.exe postinstall CONTENT_DIR=$WSUSDir
|
||||
if (Test-Path -Path $WSUSDir) {
|
||||
Write-Host 'Content Directory Exists'
|
||||
} else {
|
||||
sl "C:\Program Files\Update Services\Tools"
|
||||
.\wsusutil.exe postinstall CONTENT_DIR=$WSUSDir
|
||||
}
|
||||
|
||||
# Get WSUS Server Object
|
||||
$wsus = Get-WSUSServer
|
||||
@@ -80,11 +84,7 @@ Get-WsusProduct | where-Object {
|
||||
'.NET 8.0',
|
||||
'.NET Core 2.1',
|
||||
'.NET Core 3.1',
|
||||
'Active Directory Rights Management Services Client 2.0',
|
||||
'Active Directory',
|
||||
'Developer Tools, Runtimes, and Redistributables',
|
||||
'Dictionary Updates for Microsoft IMEs',
|
||||
'Kernel Updates',
|
||||
'Microsoft 365 Apps/Office 2019/Office LTSC',
|
||||
'Microsoft Defender Antivirus',
|
||||
'Microsoft Security Essentials',
|
||||
@@ -92,7 +92,6 @@ Get-WsusProduct | where-Object {
|
||||
'Microsoft Server Operating System-22H2',
|
||||
'Microsoft Server Operating System-23H2',
|
||||
'Microsoft Server Operating System-24H2',
|
||||
'Microsoft SQL Server 2008 R2 - PowerPivot for Microsoft Excel 2010',
|
||||
'Microsoft SQL Server 2012',
|
||||
'Microsoft SQL Server 2014',
|
||||
'Microsoft SQL Server 2016',
|
||||
@@ -103,33 +102,13 @@ Get-WsusProduct | where-Object {
|
||||
'Microsoft SQL Server Management Studio v18',
|
||||
'Microsoft SQL Server Management Studio v19',
|
||||
'Microsoft SQL Server Management Studio v20',
|
||||
'Microsoft SQL Server PowerPivot for Excel',
|
||||
'MS Security Essentials',
|
||||
'Office 2013',
|
||||
'Office 2016',
|
||||
'Office Communications Server And Office Communicator',
|
||||
'Office Communicator 2007 R2',
|
||||
'Office Live Add-in',
|
||||
'Office Live',
|
||||
'Office',
|
||||
'PowerShell - x64',
|
||||
'PowerShell Preview - x64',
|
||||
'PowerShell',
|
||||
'Remote help',
|
||||
'Report Viewer 2005',
|
||||
'Report Viewer 2008',
|
||||
'Report Viewer 2010',
|
||||
'Search Enhancement Pack',
|
||||
'Security Essentials',
|
||||
'Server 2022 Hotpatch Category',
|
||||
'Service Bus for Windows Server 1.1',
|
||||
'Silverlight',
|
||||
'Silverlight',
|
||||
'Visual Studio 2005',
|
||||
'Visual Studio 2008',
|
||||
'Visual Studio 2010 Tools for Office Runtime',
|
||||
'Visual Studio 2010 Tools for Office Runtime',
|
||||
'Visual Studio 2010',
|
||||
'Visual Studio 2012',
|
||||
'Visual Studio 2013',
|
||||
'Visual Studio 2015 Update 3',
|
||||
@@ -137,21 +116,11 @@ Get-WsusProduct | where-Object {
|
||||
'Visual Studio 2017',
|
||||
'Visual Studio 2019',
|
||||
'Visual Studio 2022',
|
||||
'Windows - Client S, version 21H2 and later, Servicing Drivers',
|
||||
'Windows - Client S, version 21H2 and later, Upgrade & Servicing Drivers',
|
||||
'Windows - Client, version 21H2 and later, Servicing Drivers',
|
||||
'Windows - Client, version 21H2 and later, Upgrade & Servicing Drivers',
|
||||
'Windows Admin Center',
|
||||
'Windows - Server, version 21H2 and later, Servicing Drivers',
|
||||
'Windows - Server, version 21H2 and later, Upgrade & Servicing Drivers',
|
||||
'Windows - Server, version 24H2 and later, Upgrade & Servicing Drivers',
|
||||
'Windows Dictionary Updates',
|
||||
'Windows GDR-Dynamic Update',
|
||||
'Windows Insider Pre-Release',
|
||||
'Windows Media Dynamic Installer',
|
||||
'Windows Next Graphics Driver Dynamic update',
|
||||
'Windows RT 8.1',
|
||||
'Windows RT',
|
||||
'Windows Safe OS Dynamic Update',
|
||||
'Windows Security platform',
|
||||
'Windows Server 2019 and later, Servicing Drivers',
|
||||
'Windows Server 2019 and later, Upgrade & Servicing Drivers',
|
||||
@@ -159,11 +128,13 @@ Get-WsusProduct | where-Object {
|
||||
'Windows Server 2019',
|
||||
'Windows Server Drivers',
|
||||
'Windows Server Manager Windows Server Update Services (WSUS) Dynamic Installer',
|
||||
'Windows Server Solutions Best Practices Analyzer 1.0',
|
||||
'Windows Server Technical Preview Language Packs',
|
||||
'Windows Server, version 1903 and later')
|
||||
} | Set-WsusProduct
|
||||
|
||||
Get-WsusProduct | where-Object { $_.Product.Title -eq 'Windows' } | Set-WsusProduct -Disable
|
||||
Get-WsusProduct | where-Object { $_.Product.Title -eq 'Developer Tools, Runtimes, and Redistributables' } | Set-WsusProduct -Disable
|
||||
|
||||
# Configure the Classifications
|
||||
write-host 'Setting WSUS Classifications'
|
||||
Get-WsusClassification | Where-Object {
|
||||
@@ -241,5 +212,5 @@ $rule.Enabled = $True
|
||||
$rule.Save()
|
||||
}
|
||||
|
||||
|
||||
$Apply = $rule.ApplyRule()
|
||||
|
||||
Reference in new issue
Block a user