powershell执行脚本的权限
1
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
删除本地office的key
1 2
| cd 'C:\Program Files\Microsoft Office\Office16' cscript ospp.vbs /dstatus
|
寻找key: Last 5 characters of installed product key:XXXXX
删除key: cscript ospp.vbs /unpkey:XXXXX
删除自带软件
1
| Get-AppxPackage *music* | Remove-AppxPackage
|
SSH 通过密钥文件远程访问 Windows 服务器
如果使用的账号在管理员组中,需要把公钥放在 C:\ProgramData\ssh\administrators_authorized_keys
中,然后运行:
1
| icacls.exe "C:\ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
|