Welcome to TechNet Blogs Sign in | Join | Help

Exchange Server scripting

* Exchange Server Message Tracking script examples:

Get-MessageTrackingLog –EventID “RECEIVE” –MessageSubject “hello” –Start “01/12/2006 00:00:00” –End “28/12/2006 18:50:00”

Get-MessageTrackingLog -EventID "RECEIVE" -MessageSubject "test email" | fl --> to get the list of all available fields

Get-MessageTrackingLog -EventID "RECEIVE" -MessageSubject "test email" | fl Timestamp, Sender, Recipients, MessageSubject

Timestamp      : 12/22/2009 9:43:10 PM
Sender         :
Administrator@mycompany.com.vn
Recipients     : {Administrator@mycompany.com.vn}
MessageSubject : Test email

Timestamp      : 1/4/2010 4:56:32 PM
Sender         :
Administrator@mycompany.com.vn
Recipients     : {Administrator@mycompany.com.vn}
MessageSubject : RE: Test email

Posted by quenguyen | 0 Comments

Operations Manager 2007 R2 on Windows 2008 R2 - Single server deployment

* OpsMgr 2007 R2 on Windows 2003 setup steps guide download (6.7 M) 

* Use Server Manager, Add Features, and under ".NET Framework 3.5.1 Features" select ".NET Framework 3.5.1"

* Install SQL 2008 Std x64, select Database Engine Services & Reporting Services (no SQL Server Replication, no Full-Text Search, no Analysis Services), then update to SP1. Use a domain account (such as MYCOMPANY\svcacct) for running SQL services. If you get this error "No mapping between account names and security IDs was done" then you might have not selected the "Generalize" checkbox when running Sysprep.

* Use Server Manager, add "Web Server" role. The following Web Server Role Services should automatically be selected: Static Content, Default Document, Directory Browsing, HTTP Errors, Request Filtering. Click to select additional Role Services: ASP.NET, .NET extensibility, ISAPI Extensions, ISAPI Filters, Windows Authentication, IIS 6 Metabase Compatibility, IIS 6 WMI Compatibility.

* Install AJAX Extension 1.0 for ASP.NET 2.0 (for WebConsole Health Explorer)

* Install Operations Manager 2007 R2
- Management Server Action Account: MYCOMPANY\svcacct (the account used for agent push installation)

* Install Operations Manager 2007 R2 Reporting
- Start SQL Reporting service
- Data Warehouse Write Account & Data Reader Account: MYCOMPANY\svcacct

* Manual agent installation on managed servers , and enable Proxy for Agents on Exchange servers

* Download and install some typical Management Packs:
- Windows Server Base OS System Center Operations Manager 2007 MP.msi
- Active Directory Operations Manager 2007 MP.msi
- Exchange Server 2007 Operations Manager 2007 R2 MP.msi

* In Authoring/Management Pack Objects/Object Discoveries, override the following:
- Exchange 2007 CAS Role Discovery

- Exchange 2007 CCR Clustered Mailbox Server Role Discovery?
- Exchange 2007 CCR Node Role Discovery?

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

* To enable External OWA synthetic transaction monitoring:
- On DNS, create CNAME mail.mycompany.com.vn pointing to the Exchange CAS server.
- On Exchange CAS: Open IIS MMC, select Server node, create Domain Certificate, set common name and friendly name to mail.mycompany.com.vn; select "Default Web Site" node, Binding, delete existing SSL binding, create a new one, and associate the newly created SSL certificate with it.
- On Exchange CAS MMC, set both internal external OWA virtual directories to https://mail.mycompany.com.vn/owa, run New-TestCasConnectivityUser.ps1, then Test-OwaConnectivity.ps1

* To see incoming emails with a specific subject from a Management Server
- Authoring tab, create a "command line" task for Exchange Hub Transport servers, Full Path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, Parameters: -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -command "Get-MessageTrackingLog -EventID 'RECEIVE' -MessageSubject 'test email' | fl Timestamp, Sender, Recipients, MessageSubject"
- Monitoring tab, Exchange group, Hub Transport node, Hub Servers State, click the newly created task on Action pane

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

* OpsMgr 2007 R2 overview slide download

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

* How to test notification settings after you configure e-mail notifications for a recipient or for a subscription in Operations Manager 2007

* How to Obtain a Certificate Using Windows Server 2008 Stand-Alone CA in Operations Manager 2007

* How to Obtain a Certificate Using Windows Server 2008 Enterprise CA in Operations Manager 2007

* Creating Graphical Reports for Exchange 2007 (Part 1)

* Configuring the Native Exchange 2007 MP for OpsMgr 2007 R2 (Part 1)

 

Posted by quenguyen | 0 Comments

Windows Server 2008 R2 Server Core

* Windows Activation steps:
- slmgr.vbs -ipk [product key here]. This step is only needed for MAK keys.
- slmgr.vbs -ato
- slmgr.vbs -dli
- slmgr.vbs -dlv

More info: http://www.windowsnetworking.com/articles_tutorials/Windows-Server-License-Manager-Script-slmgrvbs.html 

* To configure various settings such as domain joining, networking, remote management, Windows update, date/time: just issue the command sconfig

 

Posted by quenguyen | 0 Comments

Exchange 2010: Getting Started

* Exchange 2010 RC1 Typical installation on a single Windows Server 2008 R2 domain controller:

If you use the WS08R2 Server Manager GUI to install IIS and W3SVC... you may still receive errors saying that the metabase database cannot be accessed. The solution is to use PowerShell scripts to install those prerequisites as described in http://technet.microsoft.com/en-us/library/bb691354(EXCHG.140).aspx

Summary of the steps:
- Download and isntall Office 2007 System Converter: Microsoft Filter Pack from http://www.microsoft.com/downloads/details.aspx?FamilyId=60C92A37-719C-4077-B5C6-CAC34F4227CC&displaylang=en
- Right click PowerShell, Run As Admin:
+ Import-Module ServerManager
+ Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
+ Set-Service NetTcpPortSharing -StartupType Automatic
and then you can run setup.

Posted by quenguyen | 0 Comments
Filed under:

Hyper-V tips and tricks

* Want to copy files from the host to VMs quickly? I have been so comfortable with drag-and-drop support in Virtual PC so I find it frustrating when Hyper-V VMs do not support it. Here you are the solution: create a virtual private network in the host, assign the newly created NIC with 192.168.1.100, in VMs try to ping that IP, if you are OK pinging it, issue the command net use \\192.168.1.100 /user:host_user_name and then you can copy files from the host to VMs and vice-versa!

ConfigMgr 2007 client deployment using WSUS

* If you have not done so, configure the client workstations (both domain-joined and workgroup) to use the WSUS server (by using Group Policy or registry files)

* Enable Client SUP installation method in Site Database / Site Management / <site code> – <site name> / Site Settings / Client Installation Methods.

* Behind the scene, the Configuration Manager Client update bits get automatically approved in WSUS and then pushed to the client workstations. 

* On the client machine, open c:\windows\WindowsUpdate.log and check for something simiar to the below (use the wuauclt /detectnow command to expedite the process)

2009-06-15 13:46:13:628  832 66c Agent ** START **  Agent: Installing updates [CallerId = AutomaticUpdates]
2009-06-15 13:46:13:628  832 66c Agent *********
2009-06-15 13:46:13:628  832 66c Agent   * Updates to install = 1
2009-06-15 13:46:13:638  832 66c Agent   *   Title = Configuration Manager Client Installation
2009-06-15 13:46:13:638  832 66c Agent   *   UpdateId = {428DF9AD-10A9-4B6E-8FD1-6FBA23B41E22}.1
2009-06-15 13:46:15:013  832 66c DnldMgr Preparing update for install, updateId = {428DF9AD-10A9-4B6E-8FD1-6FBA23B41E22}.1.

* Fore more information, please visit: http://technet.microsoft.com/en-us/library/bb633194.aspx

ForeFront Client Security: standalone (agent only) 120 day evaluation guide

What is ForeFront Client Security (FCS) then? This is a client/server solution that helps scan and remove malware (virus, spyware, rootkit, Trojan...) in client and server operating systems. This is a new product from Microsoft.

For quick evaluation, only FCS agent is needed (no FCS server is necessary)

* Standalone FCS (agent only) detailed setup guide download (4.5M)

Below is the summary of the above guide:

a. First of all, make sure you are using "Microsoft Update" and not "Windows Update". To check, go to http://update.microsoft.com, and if you see the "Microsoft Update" link, click it to install.

b. The 120-day evaluation FCS agents can be downloaded here: 32bit x86 agent (16M), x64 agent (13M). Extract files to a folder.

c. Open a command prompt. Note: In Windows Vista/Windows 7/Windows 2008, you need to open an elevated "Command Prompt" by right clicking it and choose "Run as Administrator".

d. Go to the CLIENT folder and type clientsetup /NoMOM

e. You will then see the FCS icon on the system tray (a yellow circle with an exclamation mark). In Windows 7, the icon might be hidden and you need to click the triangle button on the system tray to reveal it.

f. If you open the FCS screen, the AV engine version is out of date (back to 2006!). Do not click any button in this screen.

g. Instead, from the Start Menu, open "Microsoft Update" (in Windows XP/2003) or "Windows Update" (in Windows Vista/Windows 7/Windows 2008) to update your Windows, your applications and of course your FCS agents.

h. After 30 minutes or so, you will see the FCS icon becoming green with a check mark.

i. Want to test it? Just click this link to download a sample (harmless) virus http://www.eicar.org/download/eicar.com 

* ForeFront Client Security - Single server deployment guide

Microsoft Ranks First in AV-Comparatives May Edition for Proactive Detection Testing!

We are #1 this time!  And it is our first time scoring Advanced+ in AV-comparatives testing.  We scored very well on both ends: second best in detection rate and we had the fewest false positives. AV-Comparatives.org published the May edition of the proactive/retrospective testing of the May Edition.  This was the continuation of the February test which focused on none-proactive testing.  This test turned to proactive and retrospective to measure the vendors’ capability in detecting new threats.  Our detection rate was 60%, the second best among the participants, and we had the fewest false positive samples.

 

This result is consistent with some recent proactive tests conducted by other industry test organizations.  In the VB100 April edition, VB introduced a new metric, Reactive and Proactive (RAP), in their test criteria.  Vendors scored from 8.0% to 94.7%.  Both FCS and OneCare score at 80% in the RAP test cases.  In addition, in the WildList response time testing by AV-test.org in 2008, Microsoft was in the clear leading position on proactive detection

 

For details, please check AV-comparatives May edition published below: http://www.av-comparatives.org/images/stories/test/ondret/avc_report22.pdf)

 

 

Installing Windows 7 from a USB stick

I found the steps from the below article:

http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/

 

Make sure your USB stick is big enough to accomodate the Windows 7 installation bits. And here below is the summary of steps and output on my own machine:

 

C:\Windows\system32>diskpart

 

Microsoft DiskPart version 6.1.7054

Copyright (C) 1999-2008 Microsoft Corporation.

On computer: MY-PC

 

DISKPART> list disk

 

  Disk ###  Status         Size     Free     Dyn  Gpt

  --------  -------------  -------  -------  ---  ---

  Disk 0    Online           37 GB      0 B

  Disk 1    Online          189 GB  5120 KB

  Disk 2    Online        15320 MB      0 B

 

DISKPART> select disk 2

 

Disk 2 is now the selected disk.

 

DISKPART> clean

 

DiskPart succeeded in cleaning the disk.

 

DISKPART> create partition primary

 

DiskPart succeeded in creating the specified partition.

 

DISKPART> select partition 1

 

Partition 1 is now the selected partition.

 

DISKPART> active

 

DiskPart marked the current partition as active.

 

DISKPART> format fs=ntfs

 

  100 percent completed

 

DiskPart successfully formatted the volume.

 

DISKPART> assign

 

DiskPart successfully assigned the drive letter or mount point.

 

DISKPART> exit

 

Leaving DiskPart...

 

C:\Windows\system32>e:        (E: drive is where the Windows 7 installation bits are located)

 

E:\>cd boot

 

E:\boot>dir

 Volume in drive E is GRC1CULFRER_EN_DVD

 Volume Serial Number is F0D7-C053

 

 Directory of E:\boot

 

03/22/2009  08:37 PM    <DIR>          .

03/22/2009  08:37 PM    <DIR>          ..

03/22/2009  08:37 PM           262,144 bcd

03/22/2009  08:37 PM         3,170,304 boot.sdi

03/22/2009  08:37 PM             1,024 bootfix.bin

03/22/2009  08:37 PM            97,280 bootsect.exe

03/22/2009  08:37 PM    <DIR>          en-us

03/22/2009  08:37 PM             4,096 etfsboot.com

03/22/2009  08:37 PM    <DIR>          fonts

03/22/2009  08:37 PM           484,928 memtest.exe

               6 File(s)      4,021,240 bytes

               4 Dir(s)               0 bytes free

 

E:\boot>bootsect.exe /NT60 G:

Target volumes will be updated with BOOTMGR compatible bootcode.

 

G: (\\?\Volume{396ea864-1e62-11de-a02a-000c76b0f5c0})

 

    Successfully updated NTFS filesystem bootcode.

 

Bootcode was successfully updated on all targeted volumes.

 

If "could not be locked" & “Access denied” error happens, try this command: bootsect.exe /NT60 G: /force

 

Then copy all files from DVD to USB, and there you go!

More Posts Next page »
 
Page view tracker