Changing WSUS application pool settings via Powershell

If you need to change the recycle settings on a WSUS server running server core, it can be done via Powershell :

Import-Module WebAdministration
Set-ItemProperty -Path IIS:\AppPools\WsusPool -Name recycling.periodicrestart.privateMemory -Value 4194304
Set-ItemProperty -Path IIS:\AppPools\WsusPool -Name ProcessModel.shutdownTimeLimit -Value 00:05:00
Set-ItemProperty -Path IIS:\AppPools\WsusPool -Name ProcessModel.idleTimeout -Value 00:00:00

Cluster Shared Volume Info

$Cluster = "XXX"
$csvdata = Get-ClusterSharedVolume -cluster $Cluster
$csvs = @()
foreach ( $csvitem in ($csvdata))
{
   $cimSession = New-CimSession -ComputerName $csvitem.OwnerNode
   $DiskInfo = Get-Disk -CimSession $cimSession 
   $volumeInfo = $DiskInfo | Get-Partition | Select DiskNumber, @{Name="Volume";Expression={Get-Volume -Partition $_ | Select -ExpandProperty ObjectId}}
   $csvVolume = $csvitem.SharedVolumeInfo.Partition.Name
   $csvdisknumber = ($volumeinfo | ? { $_.Volume -eq $csvVolume}).Disknumber
   $DiskID = ($DiskInfo | where {$_.Number -eq $csvdisknumber}).UniqueId
   $csvinfo = $csvitem | select -Property Name -ExpandProperty SharedVolumeInfo
   $csv = [pscustomobject] [ordered]@{
        Name        = $csvitem.Name
        OwnerNode   = $csvitem.OwnerNode
        Path        = $csvinfo.FriendlyVolumeName
        Size        = [int]($csvinfo.Partition.Size /1GB)
        FreeSpace   = [int]($csvinfo.Partition.FreeSpace /1GB)
        UsedSpace   = [int]($csvinfo.Partition.UsedSpace /1GB)
        PercentFree = [int]$csvinfo.Partition.PercentFree
        DiskID      = $DiskId
    }
    $csvs += $csv   
}
$csvs | sort Freespace

Name : CSVxx_LUNyy
OwnerNode : HVHOST-XXX
Path : C:\ClusterStorage\Volume21
Size : 4096
FreeSpace : 1743
UsedSpace : 2353
PercentFree : 43
DiskID : 60060E801652EE00000152EE00000090

Enable/Use Powershell Remoting

PS C:\Users\administrator> Enable-PSRemoting -force
WinRM has been updated to receive requests.
WinRM service type changed successfully.

WinRM has been updated for remote management.
Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.

PS C:\Users\administrator> Enter-PSSession SCCM
[SCCM]: PS C:\Users\administrator\Documents>