xud6

xud6

Active Directory

Powershell 转移 FSMO

获取当前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
powershell

Powershell 操作 windows更新

定义更新搜索 $Criteria = "IsInstalled=0 and Type='Software'" 搜索可用的更新 $Searcher = New-Object -ComObject Microsoft.Update.Searcher $SearchResult = $Searcher.Search($Criteria).Updates 下载更新 $Session = New-Object -ComObject Microsoft.Update.Session $Downloader = $Session.CreateUpdateDownloader() $Downloader.Updates = $SearchResult $Downloader.Download() 安装更新 $Installer = New-Object -ComObject Microsoft.Update.Installer $Installer.Updates
1 min read
MCU

CC1310 Sensor Controller 变更RTC事件时序

在delay时间后以interval的周期运行Sensor Controller的RTC事件 #include DeviceFamily_constructPath(inc/hw_aon_rtc.h) uint32_t scifOsalEnterCriticalSection(void); void scifOsalLeaveCriticalSection(uint32_t key); //delay应大于8 void SceRTCDelay(uint32_t delay,uint32_t interval){ uint32_t key, sec, subsec,startTime; /* disable hwi to make sure startTime won't become past */ key = scifOsalEnterCriticalSection(); /* read current rtc