xud6

xud6

Active Directory

Powershell 转移 FSMO

获取当前FSMO Get-ADForest | select SchemaMaster,DomainNamingMaster Get-ADDomain | select PDCEmulator,RIDMaster,InfrastructureMaster 转移FSMO Move-ADDirectoryServerOperationMasterRole -Identity -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator 强制转移FSMO Move-ADDirectoryServerOperationMasterRole -Identity -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 = $SearchResult $Result = $Installer.Install() 检查是否需要重启 $Resu
1 min read
linux

selinux 常用命令

查看是否有被selinux阻挡 sudo cat /var/log/audit/audit.log | grep denied boolean 查看boolean状态 sudo sestatus -b sudo sestatus -b | grep -i sendmail 设置boolean sudo setsebool -P $boolean名 $1或0 常用boolean boolean名意义httpd_can_network_connect允许httpd反向代理httpd_can_sendmail允许httpd发送邮件 semanager 安装semanager sudo yum install -y policycoreutils-python Centos 8 sudo yum install -y policycoreutils-python-utils 获取系统中的可用label sudo
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 value */ sec