AD 密码过期查询
- 单个AD 账号查询
net user %USERNAME% /domain
例如:
PS C:\Windows\system32> net user lansz /domain 这项请求将在域 jx.cn 的域控制器处理。 用户名 lansz 全名 Lan ShunZhou 注释 兰顺舟 …more ...
office 激活
office 2019
转换成 vol版本出现报错
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /rearm Microsoft (R) Windows Script Host Version 5.812 版权所有(C) Microsoft Corporation。保留所有权利。 ---Processing-------------------------- --------------------------------------- There was an error when trying to rearm Office. You can try …more ...
ngxtop 报错
[root@**** ~]# ngxtop Traceback (most recent call last): File "/usr/local/bin/ngxtop", line 7, in from ngxtop.ngxtop import main File "/usr/local/lib/python3.6/site-packages/ngxtop/ngxtop.py", line 77, in from config_parser import detect_log_config, detect_config_path, extract_variables, build_pattern ModuleNotFoundError: No module named 'config_parser'
解决方法:
卸 …
Python 复制文件到新的路径
import shutil
path = 'd:\11111\test.py'
newpath = 'd:\2222\test.py'
shutil.copy(path, newpath)more ...
python 列出文件夹下所有的文件以及文件夹名
import os path = 'D:\******……' #定义路径 folders = os.listdir(path) for folder in folders: print(folder)more ...
powershell:远程连接服务器
(1)在server端输入“Enable-PSRometing”,启用远程连接;
(2)在client端输入set-item wsman:\localhost\client\trustehosts –value “192.168.11.53”,将server设置为client的信任主机。
(3)输入“enter-pssession –computername 192.168.11.53 –credentrial contoso.test\administrator”,输入密码后即可远程登入server;
Centos 8 时间
CentOS8.0中默认不再支持ntp软件包,时间同步将由chrony来实现,像我这种习惯了ntp同步时间的,一时难以去适应chrony。
本文将通过wlnmp提供的源,来安装ntp服务
添加wlnmp源
安 …
more ...决WordPress修改固定链接后Nginx报404
nginx.conf 里添加如下内容:[icon name="wpforms" class="" unprefixed_class=""]
location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } }more ...
自建KMS 激活 win
wget https://github.com/Wind4/vlmcsd/releases/download/svn1111/binaries.tar.gz
解压
tar -zxvf binaries.tar.gz
Intel,那么就可以直接用我下面的命令进入目录:
./vlmcsd-x64-musl-static
查看vlmcsd的运行情况,可以使用如下命令 …
more ...CentOS8使用阿里yum源
由于CentOS 8主要使用AppStream, BaseOS, Extras三个仓库,所以在这里主要配置上面三个仓库对应的配置文件,这里的三个仓库可以理解为同一个软件源中保存了 …
more ...python3 print格式化输出---------"%s 和 % d"
打印字符串
>>> string="hello" >>> print("string=%s"%(string)) 输出: string=hello
2.打印整数
>>> print ("He is %d years old"%(25)) 输出: He is 25 years old
3.打印浮点数
>>>print ("His height is %f m"%(1.83)) 输出 …more ...
Centos date 设置自定义时间
(1)安装ntpdate工具
# yum -y install ntp ntpdate
(2)设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
(3)将系统时间写入硬件时间
# hwclock --systohc
(4)强制系统时间写 …
more ...Squid 状态查看
squidclient -p 80 mgr:info #取得squid运行状态信息: squidclient -p 80 mgr:mem #取得squid内存使用情况: squidclient -p 80 mgr:objects #取得squid已经缓存的列表,使用时要小心,可能会造成squid崩溃: squidclient -p 80 mgr:diskd #取得squid的磁盘使用情况: squidclient -p 80 -m PURGE http …more ...
Windows 下 python 打包成exe
pyinstaller.exe -F 文件路径/要打包的文件.py
more ...查看 Windows 电脑已经连接过wifi 信息
开始运行, cmd
more ...在使用Zabbix 时出现,图表中的文字无法正常显示
在使用Zabbix 时出现,图表中的文字无法正常显示。
在查阅后,得出需要检查的地方有两个:
/usr/share/zabbix/fonts/ 这个地方时存放zabbix前台显示的字体文件的,文件以 …