摘要:
Get-Mailbox -ResultSize Unlimited | select DisplayName,PrimarySmtpAddress,@{label="TotalItemSize";expression={(Get-MailboxStatistics $_.Name).TotalIte 阅读全文
posted @ 2020-07-12 20:42
会飞的老虎
阅读(468)
评论(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
会飞的老虎
阅读(178)
评论(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
会飞的老虎
阅读(599)
评论(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
会飞的老虎
阅读(411)
评论(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
会飞的老虎
阅读(740)
评论(0)
推荐(0)
摘要:
$a=Read-Host "请输入要统计的用户组" $(Get-ADGroupMember $a -Recursive).count 阅读全文
posted @ 2020-07-12 19:29
会飞的老虎
阅读(1076)
评论(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
会飞的老虎
阅读(552)
评论(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
会飞的老虎
阅读(1116)
评论(2)
推荐(0)

浙公网安备 33010602011771号