*Cube-Host– full cloud services!!
On a production server, “security” without evidence is just a guess. Proper Windows auditing gives you answers to practical questions: who logged in, what was changed, which process started, and whether someone tried to brute-force RDP.
If you run workloads on a Windows VPS, enabling audit policy is one of the fastest ways to improve incident response and meet compliance requirements. On VPS hosting, it also helps you troubleshoot issues faster because you can correlate “what happened” with “when it happened”.
Audit Policy defines which security-relevant actions are written to the Security event log. This is your primary timeline for:
A common mistake is turning on every audit category and then losing the signal in noise. For VPS environments, a better approach is:
Run as Administrator:
auditpol /get /category:*
If you manage the server via GPO, remember that domain policies can override local settings. On standalone VPS, local settings are usually enough.
Modern Windows uses Advanced Audit Policy (dozens of subcategories). To avoid conflicts between “legacy categories” and subcategories, enable the policy:
Optional (standalone servers): you can also enforce this via registry (run as Administrator) and reboot:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v SCENoApplyLegacyAuditPolicy /t REG_DWORD /d 1 /f
The following settings give strong coverage for security and troubleshooting without flooding the logs. Run these commands as Administrator:
:: Logon events (RDP/interactive/service)
auditpol /set /subcategory:"Logon" /success:enable /failure:enable
auditpol /set /subcategory:"Logoff" /success:enable /failure:enable
auditpol /set /subcategory:"Special Logon" /success:enable /failure:disable
:: Account logon (Kerberos/NTLM where applicable)
auditpol /set /subcategory:"Credential Validation" /success:enable /failure:enable
:: Account management (users/groups)
auditpol /set /subcategory:"User Account Management" /success:enable /failure:enable
auditpol /set /subcategory:"Security Group Management" /success:enable /failure:enable
:: Policy changes and privilege usage
auditpol /set /subcategory:"Audit Policy Change" /success:enable /failure:enable
auditpol /set /subcategory:"Authorization Policy Change" /success:enable /failure:enable
auditpol /set /subcategory:"Sensitive Privilege Use" /success:enable /failure:enable
:: Process creation (great for incident response)
auditpol /set /subcategory:"Process Creation" /success:enable /failure:disable
Note: “Object Access” events (files/registry) require two things: (1) enabling the audit subcategory and (2) setting SACL auditing on the actual folder/key. Without SACL, you may see almost nothing even if “Object Access” is enabled.
First, enable file system auditing:
auditpol /set /subcategory:"File System" /success:enable /failure:enable
Then configure auditing (SACL) on the folder:
This is the correct way to keep logs meaningful: audit only what matters.
Show failed logons for the last 24 hours:
$since = (Get-Date).AddDays(-1)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=$since} |
Select-Object TimeCreated, Id, Message |
Select-Object -First 30
Show process creation events (if enabled) and search for a suspicious executable name:
$since = (Get-Date).AddHours(-6)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4688; StartTime=$since} |
Where-Object { $_.Message -match 'powershell|cmd\.exe|wscript|rundll32' } |
Select-Object TimeCreated, Message |
Select-Object -First 20
On internet-facing servers, keeping logs for longer is critical. Increase Security log maximum size (example: 256 MB):
wevtutil sl Security /ms:268435456
Export Security log for archiving or incident response:
mkdir C:\Logs 2>nul
wevtutil epl Security C:\Logs\Security_$(Get-Date -Format yyyyMMdd_HHmm).evtx
If you need a predictable environment for these security baselines, start with a managed Windows VPS and keep your access surface controlled via VPS hosting firewall rules and strong authentication.