Difference between revisions of "小代码大作用:电脑开荒代码"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
<syntaxhighlight lang="powershell" line> |
<syntaxhighlight lang="powershell" line> |
||
# set-network-private.ps1 |
# set-network-private.ps1 |
||
− | # 用于把公用网络改为私用网络,实现全屋共享。需以管理员权限运行 |
+ | # 用于把公用网络改为私用网络,实现全屋共享。需以管理员权限运行:创建快捷方式,目标选本文件, |
Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private |
Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
Line 8: | Line 8: | ||
<syntaxhighlight lang="powershell" line> |
<syntaxhighlight lang="powershell" line> |
||
# shutdown.bat |
# shutdown.bat |
||
− | # 用于双击立即关机,省下从开始键点好几下才关机的 |
+ | # 用于双击立即关机,省下从开始键点好几下才关机的工夫 |
@echo off |
@echo off |
||
shutdown.exe /s /t 00 |
shutdown.exe /s /t 00 |
Revision as of 11:20, 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