# Remove-RDSTimebomb.ps1
# Remove registry value start with "L$RTMTIMEBOMB" in key GracePeriod
# Require: run as Administrator
$ErrorActionPreference = 'SilentlyContinue'
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod"
if (Test-Path $path) {
$values = (Get-Item $path).GetValueNames() | Where-Object { $_ -like "L$RTMTIMEBOMB*" }
foreach ($v in $values) {
try {
Remove-ItemProperty -Path $path -Name $v -Force
Write-Output ("{0} - Removed: {1} in {2}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'), $v, $path)
} catch {
Write-Output ("{0} - Error {1}: {2}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'), $v, ${_}.Exception.Message)
}
}
} else {
Write-Output ("{0} - Not found key GracePeriod." -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'))
}
Write-Output "Success."
Reset time cho remote desktop
Subscribe to:
Post Comments (Atom)
Dọn log Zabbix khi full disk
Show dung lượng hiện tại: df -h Check dung lượng các file log: du -sh /var/lib/my*ql/* Vào MySQL check tiếp: mysql -uroot -p Dọn log, chỉnh ...
-
Mở sysdm.cpl Xóa hết các user dưới 300MB, trừ Administrator và Default Profile Mở regedit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows N...
-
Máy giặt cửa ngang LG dùng được khoảng 2,5 năm thì vỡ chốt khi mở cửa. Sau khi vỡ, các mảnh vỡ nằm lại trong hốc khóa, khá khó gắp. Các mảnh...
-
Rút hết màn hình, chỉ để lại 1 màn hình chính dự định làm màn hình chính. Sửa regedit: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\...
No comments:
Post a Comment