Difference between revisions of "小代码大作用:电脑开荒代码"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Windows 可用 == |
== Windows 可用 == |
||
⚫ | |||
⚫ | |||
− | : Requires -RunAsAdministrator |
||
− | |||
<syntaxhighlight lang="powershell" line> |
<syntaxhighlight lang="powershell" line> |
||
⚫ | |||
⚫ | |||
Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private |
Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
⚫ | |||
⚫ | |||
<syntaxhighlight lang="powershell" line> |
<syntaxhighlight lang="powershell" line> |
||
⚫ | |||
⚫ | |||
@echo off |
@echo off |
||
shutdown.exe /s /t 00 |
shutdown.exe /s /t 00 |
Revision as of 11:16, 19 September 2023
Windows 可用
1#set-network-private.ps1
2# 用于把公用网络改为私用网络,实现全屋共享。需以管理员权限运行
3Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private
1# shutdown.bat
2# 用于双击立即关机,省下从开始键点好几下才关机的功夫
3@echo off
4shutdown.exe /s /t 00