随笔分类 - Powershell
摘要:一、Disconnected Mailboxes 1、Finding Disconnected Mailboxes The first function is called Get-DisconnectedMailbox and the name is pretty much self explan
阅读全文
摘要:Group常见属性介绍: 一、Get-ADGroup获取群组(如下例循环获取群组的发送权限)
阅读全文
摘要:一、Get-User单用户查询 二、Get-User多用户循环查询 $export=@() $Users=Get-ADUser -Filter * -SearchScope Subtree -SearchBase "OU=xx,OU=xx,dc=xx,dc=xx,dc=xx" -Properties
阅读全文
摘要:1、导出csv文档 2、发送mail 3、导入数据库 参考http://www.cnblogs.com/scentpath/p/PowershellSQL.html
阅读全文
摘要:使用Get-User命令去寻找group membership of a domain user 扩展1️:获取在群组Wendy和群组Gaga中的所有用户 扩展2:定义筛选范围条件,将这个范围内不属于某个群组的用户加入某个群组 扩展3:查询用户的隶属群组
阅读全文
摘要:一、获取域控制器服务器清单 二:备份GPO 三、查看/设置ADServer环境设定
阅读全文
摘要:查询在邮箱上设置的转发功能: Get-Mailbox -server MX01 -Filter {ForwardingAddress -like '*'} | Select-Object Name, ForwardingAddress | Export-Csv "D:\Scripts\Forward
阅读全文
摘要:Exchange Server 2010 Product name Build number Date KB Microsoft Exchange Server 2010 RTM 14.0.639.21 11/9/2009 Update Rollup 1 for Exchange Server 20
阅读全文
摘要:如何取一个数的整数值? 使用类型强制转换 Powershell的强制转换有2种方式,一种是直接类型强制转换,另一种是通过-as运算符进行转换 PS F:\> [int] (3 / 2) # 直接类型强制转换 2 PS F:\> (3 / 2) -as [int] # -as运算符进行类型转换 2 P
阅读全文
摘要:一、使用Powershell插入数据到SQL中 1、方法一 1 $ServerName=xxx 2 $Database=xxx 3 $UserID=xxx 4 $Pwd=xxx 5 $conn=new-object System.Data.SqlClient.SQLConnection 6 $Con
阅读全文
摘要:运行Invoke-Sqlcmd命令,使用这个命令需满足如下条件: 1、在运行服务器中安装SQL Server 2008 R2 Management ObjectsI 2、在运行命令 invoke-sqlcmd 前执行如下语句. 1 Add-PSSnapin SqlServerCmdletSnapin
阅读全文
摘要:Telnet Port 脚本 1 $servers = get-content D:\ps\ServerIPAddress.TXT 2 $portToCheck = '80' 3 for($i=1;$i -le 120;$i++) 4 { 5 foreach ($server in $servers
阅读全文
摘要:Get-QADGroupMember命令是Quest Active Directory的命令,必须安装如下包才能使用! 电脑路径: D:\soft\AD\Quest_Quest-One-ActiveRoles-Management-Shell-for-Active-Directory-x64_160
阅读全文
摘要:C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1';
阅读全文

浙公网安备 33010602011771号