pip 安装库时设置代理服务器
设置代理
一次性
pip install --proxy="user:password@server:port" yourpackage
指定安装的源
pip install mysqlclient -i http://http://pypi.douban.com/simple/ --trusted-host pypi.douban.commore ...
PS快速解锁AD 账号
查找账号: get-aduser -f {name -like '*santa*'} | format-list name,samaccountname
1.查询账号是否被锁定
Get-ADUser sean.shen -Properties * | Select-Object lockedout
解锁账号
Unlock-ADAccount -Identity sean.shen
PING命令的各类反馈信息
1、Reply from 75.44.24.253: bytes=32 time=3ms TTL=254
C:\>ping 75.44.24.253
Pinging 75.44.24.253 with 32 bytes of data:
Reply from 75.44.24.253: bytes=32 time=3ms TTL=254
Reply from 75.44.24.253: bytes=32 time …
more ...修改 WSL Ubuntu 18.04 默认源为阿里云镜像
Win10 Windows Store 中下载的 WSL Ubuntu 18.04 默认的源 apt install 下载速度异常缓慢,想替换成国内阿里云的镜像源。
确认默认源
首先查看默认的 …
powershell 批量更新用户账号属性
命令:
Import-Csv 'd:\phone.csv' | % { Set-ADUser -identity $_.'samaccountname' -mobilephone $_.'mobilephone' -OfficePhone $_.officephone }
phone.csv 内容如下:
Powershell 添加ad 组成员
Add-ADGroupMember -Identity <Groupname> -Members <useraccount>,<useraccount>,<useraccount>
参考地址:https://technet.microsoft.com/zh-cn/library/hh852331.aspx
more ...Centos7 安装第三方源
启用安装
yum install epel-release
安装相关的源
rpm -Uvh xxxx.rpm
Centos7 安装最新版本的mariadb
参考地址:https://downloads.mariadb.org/mariadb/repositories/#mirror=shanghai-university
1. 选择操作系统centos7
2.创建repo文件
more ...输入内容;# MariaDB 10.3 CentOS repository list - created 2018-06-05 06:27 UTC# http://downloads.mariadb.org/mariadb/repositories/[mariadb]name = MariaDBbaseurl = http …
Centos7 firewall
添加开放8080端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
(--permanent永久生效,没有此参数重启后失效)
重新载入配置
firewall-cmd …
more ...Powershell 删除ad 组成员
Remove-ADGroupMember -Identity "CN-SHAFNP2-FS-ADM-RW" -Members "lzhang" -Confirm:$false
HP DL360E GEN8 centos raid 驱动
Powershell 命令获取AD 组信息
Poweshell 命令获取AD 组信息
Get-ADGroup -Filter * -SearchBase "ou=Distribution,ou=Groups,ou=CN,ou=Centralized,dc=automotive,dc=ald,dc=socgen"
获取组成员:
Get-ADGroupMember -identity "GROUPNAME" -Recursive | Get-ADUser -Property DisplayName | Select Name,ObjectClass,DisplayName,SamAccountName,mail
常用属性:
SamAccountName登录名
Displayname显示名称 …
more ...PST 文件损坏
可以使用 SCANPST.exe 进行修复。

选择出错的PST 文件
不过通常修复时间需要4个小时左右
more ...Powershell 更新指定语言的help文档
Outlook 无法打开超链接
今天打开outlook中的链接出现如下提示:
修改注册表:定位到HKEY_CURRENT_USER\Software\Classes\.html。在默认项上点右键,选择修改,将Htmlfile粘贴到输入框,点确定。然后点退出。重新打开office
原因:卸载了之 …
more ...