小代码大作用:电脑开荒代码: Difference between revisions

From 清冽之泉
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Windows 可用 ==
== Windows 可用 ==
<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

Revision as of 11:17, 19 September 2023

Windows 可用

# set-network-private.ps1
# 用于把公用网络改为私用网络,实现全屋共享。需以管理员权限运行
Set-NetConnectionProfile -InterfaceAlias "以太网" -NetworkCategory Private
# shutdown.bat
# 用于双击立即关机,省下从开始键点好几下才关机的功夫
@echo off
shutdown.exe /s /t 00

Debian 可用