07 2020 档案

摘要:重置用户配置文件,删除如下对应的注册表项,删除C:\Users\%username% 可以解决用户使用临时配置文件登录问题 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList 阅读全文
posted @ 2020-07-28 14:39 会飞的老虎 阅读(6830) 评论(0) 推荐(0)
摘要:以可配置为荣,以硬编码为耻 。 以系统互备为荣,以系统单点为耻 。 以随时可重启为荣,以不能迁移为耻 。 以整体交付为荣,以部分交付为耻 。 以无状态为荣,以有状态为耻 。 以标准化为荣,以特殊化为耻 。 以自动化工具为荣,以人肉操作为耻 。 以无人值守为荣,以人工介入为耻 。 阅读全文
posted @ 2020-07-17 16:01 会飞的老虎 阅读(413) 评论(0) 推荐(0)
摘要:将以下保存为bat脚本文件 timeout /t 2 暂停2秒net use S: \\serverip\xxxx 映射网络路径到S盘 阅读全文
posted @ 2020-07-14 15:03 会飞的老虎 阅读(386) 评论(0) 推荐(1)
摘要:强制刷新域策略gpupdate /force 导出域策略结果GPRESULT /H d:\GPReport.html 查看当前策略rsop.msc 阅读全文
posted @ 2020-07-14 14:46 会飞的老虎 阅读(1893) 评论(0) 推荐(1)
摘要:Get-TransportRule |fl SamAccountName,name,description >> C:\mailRule.csv 阅读全文
posted @ 2020-07-13 15:23 会飞的老虎 阅读(296) 评论(0) 推荐(0)
摘要:outlook exchange server 强制更新通讯录 "————-客戶端強制更新方式————–Outlook通訊錄默認情況需要2~3天同步通訊錄,可以使用下列方式立即刷新通訊1. 關閉outlook,打開下列文件夾%userprofile%\AppData\Local\Microsoft\ 阅读全文
posted @ 2020-07-13 15:20 会飞的老虎 阅读(1660) 评论(0) 推荐(0)
摘要:Get-InboxRule -Mailbox xxxxx 阅读全文
posted @ 2020-07-13 15:18 会飞的老虎 阅读(243) 评论(0) 推荐(0)
摘要:"Get-Mailbox -server dag2 –ResultSize unlimited | Group-Object –Property:Alias | Group-Object –Property:Count | Select Count" 阅读全文
posted @ 2020-07-13 15:15 会飞的老虎 阅读(212) 评论(0) 推荐(0)
摘要:Get-ADUser -filter * -SearchBase 'OU=aaaaaa,OU=aaaa,OU=aaaaa,DC=test,DC=cn' -Properties *|Get-ADUser -Properties Mail | Select-Object Name,Mail |expor 阅读全文
posted @ 2020-07-12 23:08 会飞的老虎 阅读(278) 评论(0) 推荐(0)
摘要:Get-ADGroupMember -Identity group1 -Recursive | Get-ADUser -Properties Mail | Select-Object Name,Mail |export-csv D:\groupdetail.csv –NoTypeInformatio 阅读全文
posted @ 2020-07-12 23:03 会飞的老虎 阅读(181) 评论(0) 推荐(0)
摘要:"Get-ADComputer -Filter * -SearchBase ""OU=XXX,DC=TEST,DC=cn"" -Properties * | select lastLogon, lastLogonTimestamp | export-csv C:\Computers.csv -NoT 阅读全文
posted @ 2020-07-12 21:41 会飞的老虎 阅读(280) 评论(0) 推荐(0)
摘要:Get-MailboxDatabase HR | Set-MailboxDatabase -PublicFolderDatabase PublicXXX 阅读全文
posted @ 2020-07-12 21:36 会飞的老虎 阅读(188) 评论(0) 推荐(0)
摘要:Get-ADUser -Filter {Enabled -eq "False"} |select UserPrincipalName |Export-Csv Disable.csv -encoding utf8 阅读全文
posted @ 2020-07-12 21:00 会飞的老虎 阅读(534) 评论(0) 推荐(0)
摘要:批量迁移用户到数据库,user.txt表中,只包含用户名一列 Get-Content c:\user.txt | Get-mailbox | new-moveRequest -TargetDatabase 数据库名 阅读全文
posted @ 2020-07-12 20:58 会飞的老虎 阅读(868) 评论(0) 推荐(0)
摘要:Get-Mailbox -ResultSize Unlimited| Get-Mailboxstatistics | where-object {$_.LastLogonTime -lt (get-date).AddDays(-30)} |select DisplayName,TotalItemSi 阅读全文
posted @ 2020-07-12 20:55 会飞的老虎 阅读(363) 评论(0) 推荐(0)
摘要:当数据库挂载不上时使用 mount-database –Identity 200MB_DB01 -Force 阅读全文
posted @ 2020-07-12 20:53 会飞的老虎 阅读(941) 评论(0) 推荐(0)
摘要:邮箱数据库整理,查询邮箱数据库大小和空白数据大小AvailableNewMailboxSpace是指的这个总空间里可以被“减肥”掉的空间。 Get-MailboxDatabase db0* -Status | FT Name,@{n="MailboxCount";e={(Get-Mailbox -D 阅读全文
posted @ 2020-07-12 20:49 会飞的老虎 阅读(479) 评论(0) 推荐(0)
摘要:Get-Mailbox -ResultSize Unlimited | select DisplayName,PrimarySmtpAddress,@{label="TotalItemSize";expression={(Get-MailboxStatistics $_.Name).TotalIte 阅读全文
posted @ 2020-07-12 20:42 会飞的老虎 阅读(490) 评论(0) 推荐(0)
摘要:查询用户某个时间段发件记录,需要Organization Management组权限 Get-MessageTrackingLog -Server Mail -ResultSize unlimited -Start "09/22/2014 09:00:00" -End "09/25/2014 18: 阅读全文
posted @ 2020-07-12 20:33 会飞的老虎 阅读(192) 评论(0) 推荐(0)
摘要:"import-csv -path C:\mac.csv | foreach { $a=$_.name Get-DhcpServerv4Scope | Get-DhcpServerv4Lease |where {$_.ClientId -like ""$a"" }} | export-csv c:\ 阅读全文
posted @ 2020-07-12 20:23 会飞的老虎 阅读(617) 评论(0) 推荐(0)
摘要:$a=Read-Host "请输入账号" remove-adgroupmember -identity group01 -members $a -confirm:$false #把用户从group01移除Add-ADGroupMember -identity group11111 -members 阅读全文
posted @ 2020-07-12 20:05 会飞的老虎 阅读(436) 评论(0) 推荐(0)
摘要:1.powershell循环调用CSV文件 Import-Csv -Path E:\work\AD\0708\m.csv | foreach { $a=$_.name #定义$a等于CSV文件中的变量,有时候直接写$_.name 无法被识别 ………………………………} 2.调用用户输入的变量 $a= 阅读全文
posted @ 2020-07-12 19:35 会飞的老虎 阅读(758) 评论(0) 推荐(0)
摘要:$a=Read-Host "请输入要统计的用户组" $(Get-ADGroupMember $a -Recursive).count 阅读全文
posted @ 2020-07-12 19:29 会飞的老虎 阅读(1099) 评论(0) 推荐(0)
摘要:批量导出AD用户的最后一次登录时间 import-csv -path c:\test.csv |%{get-aduser $_.SamAccountName -Properties lastlogon} | select SamAccountName, @{n="Lastlogon";e={[dat 阅读全文
posted @ 2020-07-12 19:24 会飞的老虎 阅读(574) 评论(0) 推荐(0)
摘要:从组中移除用户 Remove-adgroupmember -identity group02 -members san_zhang 批量移除组中的用户for /f ""skip=1 eol=;tokens=1-3 delims=,"" %%a in (E:\disuser.csv) do forea 阅读全文
posted @ 2020-07-12 19:01 会飞的老虎 阅读(1151) 评论(2) 推荐(0)
摘要:根据以往配置Ubuntu静态ip的经验,直接 vi /etc/network/interfaces 在该文件下配置了静态ip,重置网络后发现并没有生效 所以查了ubuntu版本,是18.04,然后百度,发现“ubuntu从17.10开始,已放弃在/etc/network/interfaces里固定I 阅读全文
posted @ 2020-07-10 10:23 会飞的老虎 阅读(679) 评论(0) 推荐(0)
摘要:1. 将/etc/sysconfig/network-scripts/ifcfg-ens1f0和ifcfg-ens1f1文件备份到root目录下2. 修改/etc/sysconfig/network-scripts/ifcfg-ens1f0配置文件 DEVICE=ens1f0 TYPE=Ethern 阅读全文
posted @ 2020-07-10 10:00 会飞的老虎 阅读(5539) 评论(0) 推荐(0)
摘要:批量导出Import-Csv -Path c:\user.csv | foreach-object -process {New-MailboxExportRequest -Mailbox $_.name -FilePath "\\serverip\test\$_.name.pst"}删除test用户 阅读全文
posted @ 2020-07-09 23:45 会飞的老虎 阅读(223) 评论(0) 推荐(0)
摘要:1.导出组织架构OU的用户信息 Get-ADUser -filter * -SearchBase 'OU=test1,OU=test2,DC=domain,DC=cn' -Properties SamAccountName,DisplayName,DistinguishedName|export-c 阅读全文
posted @ 2020-07-03 11:54 会飞的老虎 阅读(1348) 评论(0) 推荐(0)
摘要:用于windows server文件服务器数据迁移可以使用带 /O/X/E/H/K 参数的 Xcopy 命令复制文件并保留已应用到这些文件的现有权限。 其中: /E - 复制文件夹和子文件夹,包括空文件夹。 /H - 还复制隐藏文件和系统文件。 /K - 复制属性。一般情况下,Xcopy 将重置只读 阅读全文
posted @ 2020-07-03 11:20 会飞的老虎 阅读(2232) 评论(0) 推荐(1)