#密码续期#给最近60天内登录的用户进行密码续期#续期用户只包含密码已过期人员$Date1=(Get-Date).AddDays(-60)$Date2=(Get-Date)Get-ADUser-SearchBase"OU=x,DC=x,DC=com"-filter{Enabled-eq$True-andPasswordNeverExpires-eq$False-andLastLogonDate-g
#requires–runasadministratorfunctionSet-RegistryValue($key,$name,$value,$type="String"){if((Test-Path$key)-eq$false){md$key|Out-Null}Set-ItemProperty$key$name$value-type$type}#修改注册表,更改远程端口Set-Registry
使用powershell连接Oracle数据库
1、首先找到zabbix官网https://www.zabbix.com/download?zabbix=3.4&os_distribution=centos&os_version=7&db=MySQL我选择centsos7与mysql版2、按照官网的提示,依次执行以下命令rpm-ihttp://repo.zabbix.com/zabbix/3.4/rhel/7/x86_6
删除文本文件的特定行defremoveLine(filename,lineno):fro=open(filename,"r",encoding='UTF-8')current_line=0whilecurrent_line<lineno:fro.readline()current_line+=1seekpoint=fro.tell()frw=open(filename,"r+")frw.se
win32ts.WTSRegisterSessionNotification监控计算机锁定状态https://msdn.microsoft.com/en-us/library/aa383841(v=vs.85).aspx代码:WM_WTSSESSION_CHANGE=0x2B1classWTSMonitor():className="WTSMonitor"wndName="WTSEventMoni
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号