初始化Windows系统的一些必要操作
作者:互联网
软件篇
安装winget
Install Winget
if (-not $(Get-Command winget -ErrorAction SilentlyContinue)) {
Write-Host "Installing WinGet..." -ForegroundColor Green
Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget"
while(-not $(Get-Command winget -ErrorAction SilentlyContinue))
{
Write-Host "Winget is still not found!" -ForegroundColor Yellow
Start-Sleep -Seconds 5
}
}
软件链接
xdown
mgnb
Auto Dark Model
有道云笔记
ZeroTier
Utools
通过powershell默认安装exe软件。
https://stackoverflow.com/questions/47110728/powershell-download-and-run-exe-file
https://stackoverflow.com/questions/45756791/install-software-using-powershell-script?rq=1
设置篇
设置Windows投影默认为第二屏幕
-
点击开始按钮>输入cmd>右键点击搜索结果中的"命令提示符">以管理员身份运行
-
在打开的命令提示符窗口中运行:
notepad C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\SecondOnly.bat
- 确认新建文件,粘贴下面内容到记事本中:
@echo off
DisplaySwitch.exe /external
-
保存并关闭记事本程序
-
重启电脑看一下是否成功了呢
完全删除小组件
# 卸载
winget uninstall MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy
# 安装
winget install 9MSSGKG348SP
配置ssh私钥
git config --global user.name 'gxhao'
git config --global user.email '1625546088@qq.com'
# 生成密钥(注意设置git账号密码
ssh-keygen -t rsa -C '1625546088@qq.com'
# 检测是否配置成功
ssh -T git@github.com
配置idea插件地址
jrebel 激活
http://jrebel.whrj999.com/3d64b43e-0da7-40a3-925a-844e5a57aea8
设置git代理
iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/162554/b14669da81dd9574cc7ae34955be7fbe/raw/86a5b82f47a8f5e9c822a749782dc08e6d59b230/SetProxy.psm1'))
$ git config --global git.proxy http://127.0.0.1:1080
$ git config --global http.proxy http://127.0.0.1:1080
$ git config --global https.proxy http://127.0.0.1:1080
http.https://github.com.proxy=socks5://127.0.0.1:10808
激活Windows
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
# 获取激活服务器地址 https://kms.msguides.com/
slmgr /skms s8.uk.to
slmgr /ato
FAQ
锁屏桌面壁纸不更新
我刚刚解决了这个问题。先将"Windows 聚焦" 改为 "图片",再删除C:\Users\gxhao\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings
目录下settings.dat
和roaming.lock
这两个文件。(注意是隐藏的文件)再 由 "图片" 改回 "Windows 聚焦"。稍等,OK!
之后就可以看到:
...\Microsoft.Windows.ContentDeliveryManager_***\LocalState\Assets
文件夹里下载了一批聚焦图片
..\Microsoft.Windows.ContentDeliveryManager_***\settings
目录下重新生成了settings.dat文件。
标签:初始化,git,http,Windows,必要,https,winget,com 来源: https://www.cnblogs.com/gxhao/p/15848551.html