WinSxS cleanup
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStoreDism.exe /Online /Cleanup-Image /spsupersededDism.exe /online /Cleanup-Image /StartComponentCleanup
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStoreDism.exe /Online /Cleanup-Image /spsupersededDism.exe /online /Cleanup-Image /StartComponentCleanup
$WSUS = Get-WsusServer -Name SERVERNAME -PortNumber 8530Invoke-WsusServerCleanup -UpdateServer $WSUS -CleanupObsoleteComputers -VerboseInvoke-WsusServerCleanup -UpdateServer $WSUS -CleanupObsoleteUpdates -VerboseInvoke-WsusServerCleanup -UpdateServer $WSUS -CleanupUnneededContentFiles -VerboseInvoke-WsusServerCleanup -UpdateServer $WSUS -DeclineExpiredUpdates -VerboseInvoke-WsusServerCleanup -UpdateServer $WSUS -DeclineSupersededUpdates -Verbose
$computers = @(“COMP01″,”COMP02”) foreach ($computer in $computers) { echo $computer if (Test-Connection -BufferSize 32 -Count 1 -ComputerName $computer -Quiet) { echo “ON” #Get-WmiObject -computer $computers Win32_Service -Filter “Name=’Spooler'”| ft systemname, name, state #set your first argument as $computer #$computer = $args[0] #Stop the service: Get-WmiObject -Class Win32_Service -Filter ‘name=”spooler”‘ -ComputerName $computer | Invoke-WmiMethod -Name StopService […]
> DISM.exe /Online /Cleanup-Image /spsuperseded
1. Manual update SELKS performs a daily suricata update (via /etc/crontab). To execute it manually call as www-data (!!!) NEVER RUN AS ROOT!!! # /bin/sh -c /bin/bash ‘cd /usr/share/python/scirius/ && . bin/activate && python bin/manage.py updatesuricata && deactivate’ www-data 2. fast.log rotation You MUST restart suricata to create a functional fast.log after logrotate. SIGHUP and/or […]
Automatic: dpkg-reconfigure unattended-upgrades vi /etc/apt/apt.conf.d/50unattended-upgrades //Unattended-Upgrade::Remove-Unused-Dependencies “false”; —> //Unattended-Upgrade::Remove-Unused-Dependencies “true”; By hand: apt install byobu purge-old-kernels or apt autoremove –purge
while read LINE; do echo “$LINE” | grep ‘^#’ > /dev/null && continue echo “$LINE” | grep ‘^\s*$’ > /dev/null && continue STRG=”$(echo “$LINE” | sed ‘s|\#.*$||’ | awk ‘{gsub(/^ +| +$/,””)} {print $0}’)” echo “x${STRG}x” done < $A_FILE
You must be logged in to post a comment.