mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 13:17:26 +00:00
Update auditbreak
This commit is contained in:
parent
e0a7f158ca
commit
de04731dc3
1 changed files with 8 additions and 2 deletions
10
auditbreak
10
auditbreak
|
|
@ -1,3 +1,8 @@
|
||||||
|
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
||||||
|
Write-Warning "Please run it on Windows. "
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# Define the embedded REG content
|
# Define the embedded REG content
|
||||||
$regContent = @"
|
$regContent = @"
|
||||||
Windows Registry Editor Version 5.00
|
Windows Registry Editor Version 5.00
|
||||||
|
|
@ -48,8 +53,9 @@ if ($auditStatus.$auditValue -eq 1) {
|
||||||
Write-Host "Audit Mode is now disabled."
|
Write-Host "Audit Mode is now disabled."
|
||||||
|
|
||||||
# Run your command
|
# Run your command
|
||||||
$command = "net.exe user Administrator /active:yes"
|
$command = "C:\Windows\system32\net.exe"
|
||||||
Start-Process -FilePath $command -Wait
|
$args = "user Administrator /active:yes"
|
||||||
|
Start-Process -FilePath $command -ArgumentList $args -Wait
|
||||||
Write-Host "Administrator account is now enabled."
|
Write-Host "Administrator account is now enabled."
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Audit Mode is not active."
|
Write-Host "Audit Mode is not active."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue