mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-15 12:47:40 +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
|
||||
$regContent = @"
|
||||
Windows Registry Editor Version 5.00
|
||||
|
|
@ -48,8 +53,9 @@ if ($auditStatus.$auditValue -eq 1) {
|
|||
Write-Host "Audit Mode is now disabled."
|
||||
|
||||
# Run your command
|
||||
$command = "net.exe user Administrator /active:yes"
|
||||
Start-Process -FilePath $command -Wait
|
||||
$command = "C:\Windows\system32\net.exe"
|
||||
$args = "user Administrator /active:yes"
|
||||
Start-Process -FilePath $command -ArgumentList $args -Wait
|
||||
Write-Host "Administrator account is now enabled."
|
||||
} else {
|
||||
Write-Host "Audit Mode is not active."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue