xud6的笔记本

徐岱青

清理 GPO 中 Extra Registry Settings

 •  Filed under Active Directory, windows

对于Office Deployment中Setting值为Software\Policies\Microsoft\Office\11.0\Word\DisabledCmdBarItemsCheckBoxes\FileOpenToolsFind的项,如果在User Configuration中

Remove-GPRegistryValue -Name "Office Deployment" -Key "HKCU\Software\Policies\Microsoft\Office\11.0\Word\DisabledCmdBarItemsCheckBoxes" -ValueName "FileOpenToolsFind"

对应的如果在Computer Configuration中应把HKCU换为HKLM

Powershell 转移 FSMO

 •  Filed under Active Directory, windows

获取当前FSMO

Get-ADForest | select SchemaMaster,DomainNamingMaster
Get-ADDomain | select PDCEmulator,RIDMaster,InfrastructureMaster

转移FSMO

Move-ADDirectoryServerOperationMasterRole -Identity <Target-DC> -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator

强制转移FSMO

Move-ADDirectoryServerOperationMasterRole -Identity <Target-DC> -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator -Force

npm 临时更改当前 registry

 •  Filed under nodejs

设置环境变量npm_config_registry为目标registry

Linux/MACOS下

export npm_config_registry=https://registry.npmjs.org

powershell远程激活windows

 •  Filed under windows
$computer = gc env:computername

$key = "激活密匙"

$service = get-wmiObject -query "select * from SoftwareLicensingService" -computername $computer

$service.InstallProductKey($key)

$service.RefreshLicenseStatus()

修改windows internet连接测试服务器 (NCSI)

 •  Filed under windows

使用注册表编辑器 regedit 访问 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NlaSvc\Parameters\Internet

ActiveWebProbeHost/ActiveWebProbeHostV6
服务器域名

ActiveWebProbePath/ActiveWebProbePathV6
测试文件路径

ActiveWebProbeContent/ActiveWebProbeContentV6
测试文件内容