• Que Nguyen's Microsoft techology blog

    Installation notes of my demo Exchange 2007 SP1 on a Win 2003 R2 SP2

    • 0 Comments

    * Exchange 2007 typical pre-setup steps
    - Raise Domain to Native mode (in AD Domains and Trusts)
    - Install DotNet framework 2.0 SP1 (Dot.NET Framework 2.0 SP1 -32b- NetFx20SP1_x86.exe)
    - Install the TimeZone fix (TimeZone fix - 32b - WindowsServer2003-KB933360-x86-ENU.exe)
    - Install PowerShell (for example PowerShell WindowsServer2003.WindowsXP-KB926139-v2-x64-ENU.exe for the 64 bit enviroment)
    - Run Ex 2007 SP1 setup, Typical; Org Name: My Company; remember to choose to support Outlook 2003,
     and ignore the SMTP/Send Connector warning
    - Restart

    * Exchange 2007 Edge pre-setup steps
    - Install DotNet framework 2.0 SP1 (Dot.NET Framework 2.0 SP1 -32b- NetFx20SP1_x86.exe)
    - Install the TimeZone fix (TimeZone fix - 32b - WindowsServer2003-KB933360-x86-ENU.exe)
    - install ADAM SP1 (ADAMSP1_x86_English.exe)
    - enter DNS suffix for computer name (My Computer Properties) --> for example, HN-EDGE-01.mycompany.com.vn

    * To register Exchange 2007 roles with Security Configuration Wizard (SCW)
    CD C:\WINDOWS\security\msscw\kbs
    copy "c:\program files\microsoft\exchange server\scripts\*.xml
           (to copy Exchange2007.xml, Exchange2007Edge.xml, Exchange2007Edge_WinSrv2008.xml, Exchange2007_WinSrv2008.xml)
    scwcmd register /kbname:MSExchange2007 /kbfile:exchange2007.xml
    scwcmd register /kbname:Ex2007EdgeKB /kbfile:Exchange2007Edge.xml

    * Start Outlook 2003

    * Clicking SendReceive in Outlook --> 8004010F Exchange object not found
    - Exch 2003: Exchange System Mgr, Recipients, Offline Address Lists, right click Default Offline Address List, Rebuild
    - Exch 2007: Org Config/Mailbox/Offline Address Book, Update (watch the Status bar for task completion)
     Then go to Server Config/Mailbox/First Storage Group/Mailbox DB/Properties/Client Settings:
     browse to enter 'Defautl Offline Address List'
    - Close, and reopen Outlook

    * Create mailboxes for director1, manager1, staff1, staff2; send a welcome message

    * OWA publishing:
    - hn-srv-01, IIS Mgr, Default WebSite, Directory Prop, View Cert, Copy To, Export private key+Cert chain
    - ISA-Server: MMC, Computer Cert, Import cert to Personal folder
    - ISA-Server: Publish Exchange Web rule, Exchange 2007, SSL, internal name: www.mycompany.com.vn
    - Internet: MMC, Computer Cert, Import hn-srv-01 root cert to Trusted Root folder

    * IMPORTANT: OWA from Internet requires logging on 2 times -->
     Server Config/Client Access/OWA/Authentication tab: change from "Use form-based" to "Use on or more", Basic
     then iisreset /noforce

    * OWA from Internet machine: Revocation information for the security certificate for this site is not available
    --> Resolution 1: Uninstall the "IE Advanced Security"
    --> Resolution 2: http://support.microsoft.com/kb/308087
     - Wrong Message Appears When You Visit a Secure Web Site Whose CDP Is Unavailable
    IE/Tools/Options/Advanced, Security: uncheck "Check for server certificate revocation (requires restart)"

    * Outlook Anywhere:
    - ISA-Server: add one path to the OWA rule: /rpc/*
    - hn-srv-01: Server Config/ Client Access/ right click hn-srv-01
      /Enable Outlook Anywhere (external host: www.mycompany.com.vn)
    - hn-srv-01: need to wait 15min (check in app event log)
    Event Source: MSExchange RPC Over HTTP Autoconfig, EventID: 3006,
    The Outlook Anywhere feature has been enabled. The ValidPorts registry setting has been modified to reflect this change.
    New value: HN-SRV-01:6001-6002;HN-SRV-01:6004;hn-srv-01.mycompany.com.vn:6001-6002;hn-srv-01.mycompany.com.vn:6004
    - Test for all users

    * Disable Screen Saver for all users on Client02

    * Client02: Display\Themes\Browse to use the built-in Luna.theme at C:\WINDOWS\Resources\Themes, background: Azul
    (need to start the Theme service first)

    * Install ForeFront for Exchange SP1, run SCW

    * To configure AntiSpam agent (Content Filtering) on the Hub Transport
    SOURCE: Book Online: mk:@MSITStore:C:\Program%20Files\Microsoft\Exchange%20Server\bin\exchhelp.chm::/html/5683549a-4f48-429d-b353-cc2b7c784e29.htm

    - close Exchange Mgmt Console
    - Open "Exchange Management Shell", change to "C:\Program Files\Microsoft\Exchange Server\Scripts"
    and type "install-AntispamAgents.ps1", then restart "Exchange Transport" service

    - Set-OrganizationConfig -SCLJunkThreshold:9

    - launch Exchange Mgmt Console

    - For demo purpose: Org Config/Hub Transport/AntiSpam: turn off 'Content Filtering'

    * Room Mailbox Auto Accept setting:
    Set-MailboxCalendarSettings MeetingRoom2 -AutomateProcessing:AutoAccept

    * To receive mails from Internet, on Exchange 2007 MMC:
    . Server Config/Hub Transport/Manage Hub Transport/Receive Connectors/<Default SERVERNAME>/Props
     Permission Groups and select "Anonymous users" (Note: do not select <Client SERVERNAME> receive connector)

    - Publish SMTP Server thru ISA (Publish Mail Servers command, server to server comm)

    * To send mails to Internet:
    . Org Config/Hub Transport/Send Connectors/Create New Send Connector
     Name: 'My SMTP Send Connector to Internet', Intended use: Internet
     Add Address Space: Address: *, 'Use DNS MX...', no need to select 'Use external DNS on Transport server'
     (whose settings can be configured in Server Config/Hub Transport/hn-srv-01/Prop/External DNS lookups

    - In ISA, 'Create Access Rule' command to allow outgoing SMTP, DNS

    * To allow OWA users to open File Shares:
    . Server Config/Client Access/owa/Prop/Remote File Servers/Allow: enter 'hn-srv-01'

    * /AccountingWeb/*, /hrWeb/*, /ResetPwdWeb/* --> in HN-SRV-01/IIS Mgr, folder prop, DirSec, Auth: change to Basic
    Error Code: 403 Forbidden. The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. (12202)

    . Enroll RMS
    . Activate RMS (MS Word, Restricted Permission As...) for all users in HN-SRV-01 & CLIENT02
    . Create test RMS-protected doc on \\hn-srv-01\shared\reports

    - Copy sample virus files to all machines
    - ForeFront set to 2 engines (Kapersky & Sophos) for (Transport/Realtime/Manual scan)
    - create ISA rule for EAS
    - Ex 2007 console: modify device policy to enforce device password
    - server config/client access/EAS: add hn-srv-01 to Allow List
    - create shared doc for accessing from within OWA and Windows Mobile

    ************************ OTHER INFO *************************************

    * Group Policy not processed at Client01: Source: Userenv Event ID: 1053,
     test using netdiag and dcdiag, then restart hn-srv-01

    * Error Code: 404 Not Found. The requested item could not be located. (12028)
    --> Resolution: run SCW on hn-srv-01 again


    * * Security Configuration Wizard (SCW) Update for Internet Security and Acceleration (ISA) Server 2006 Standard Edition and Enterprise Edition
    http://www.microsoft.com/downloads/details.aspx?familyid=2748A927-BD3C-4D87-80FA-8687D5E2AB35&displaylang=en

    ************** RCP/HTTP EXCHANGE 2003 +DC CO-LOCATED SETUP BEGIN ****************
    * hn-srv-01, Exch System Mgr, RPC/HTTP tab, back end server, OK, OK, do not reboot
    * [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\RpcProxy]
    "Enabled"=dword:00000001
    "ValidPorts"="hn-srv-01:6001-6002;hn-srv-01.mycompany.com.vn:6001-6002;hn-srv-01:6004;hn-srv-01.mycompany.com.vn:6004;"

    * configure RPC folder in IIS, basic auth, SSL required
    * ISA-Server: create RPC path in OWA publishing rule
    * Outlook RPC/HTTP on client (on public Internet) will virtually work immediately.
    * Restart hn-srv-01 to make sure the changes are in effect

    * user staff1 initially cannot be used with RPC/HTTP. Reason: Outlook Profile/Connection Tab/Use HTTP... check box is not selected.
     Resolution: Delete Windows profile for staff1
    ************** RCP/HTTP EXCHANGE 2003 +DC CO-LOCATED SETUP END **************

    * publish hrweb, accountingweb, pwdresetweb: Basic auth, require SSL in IIS, Form Based auth in ISA
    Error Code: 500 Internal Server Error. The target principal name is incorrect. (-2146893022)
    --> Resolution: rule prop, To tab, This rule applies to this published site: enter 'www.mycompany.com.vn', Path tab, change from "/hrWeb" to "/hrWeb/*"

    * disable: System Event Notification (sens) on hn-srv-01

    * Edge Subscription
    - IP: 203.162.1.201, DNS: 203.162.1.1
    - ISA 2006 Std between Hub and Edge servers
    - In the Edge server: configure FQDN name;
    - Install the pre-requisites, then Ex 2007 Edge role
    - CD C:\WINDOWS\security\msscw\kbs; copy "c:\program files\microsoft\exchange server\scripts\*.xml; scwcmd register /kbname:Ex2007EdgeKB /kbfile:Exchange2007Edge.xml; Run Security Configuration Wizard
    - Create a record in HOSTS file, pointing to the external NIC of ISA server: 203.162.1.200 hn-srv-01.mycompany.com.vn
    - In HN-SRV-01, DNS, create a record for Edge: 203.162.1.201 hn-edge-01.mycompany.com.vn
    - In ISA: allow outgoing DNS/SMTP and a custom protocol 50636 (Edge Sync) TCP only from Internal to External;
    - From Hub, telnet hn-edge-01.mycompany.com.vn 25;
    - From Hub, telnet hn-edge-01.mycompany.com.vn 50636;
    - In ISA: publish SMTP server of the Hub
    - From Edge: telnet hn-srv-01.mycompany.com.vn 25
    - In Edge, Exchange Shell: New-EdgeSubscription –filename c:\edgesub.xml
    - In Hub, New Edge Subscription
    - No need to modify the Hub, including Anonymous user support in Default Receive connector, and Smart Host (--) in the "Edge Sync - Inbound to Default-First-Site-Name"
    - From ISP, email to user@mycompany.com.vn, in Edge Queue Viewer, error: 500 5.5.1 Unrecognized command. Solution: disable SMTP filter (Configuration/Add-in) in ISA. More info: Message Queue on an Edge Transport Server with 500 5.1.1 Unrecognized Command Error, and How to Add SMTP Verb Commands to ISA Server 2006

    * ForeFront Protection 2010 for Exchange
    - Prerequisites: MSXML 6.0, dotnet framework 3.0, dotnet framework 3.0 SP1

    - Sample EICAR virus string:
    X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
    - Sample Gtube string for spam email testing (from http://spamassassin.apache.org/gtube/)
    XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

  • Que Nguyen's Microsoft techology blog

    Programmatically change phone numbers in Outlook

    • 0 Comments

    First of all, you need to allow Macro execution by going to Tools/Marcro/Security, then restart Outlook

    Press Alt-F11 to open the Macro window. Below is the code skeleton for you to start with. 

    Sub Outlook_Contact_Change()

        Dim folder As Outlook.folder
        Set folder = Session.PickFolder
        MsgBox folder.Name
       
        Dim contact As contactItem
        For Each contact In folder.items
            MsgBox contact.BusinessTelephoneNumber, , contact.LastNameAndFirstName
            ' contact.BusinessTelephoneNumber = "new number"
            ' contact.Save

        Next

    End Sub

  • Que Nguyen's Microsoft techology blog

    Microsoft Software Restriction Policies

    • 0 Comments
    Software restriction policies are free features found in Windows XP and Windows Server 2003 and above. They can be used to control which software is allowed to run on your computer.
     
  • Que Nguyen's Microsoft techology blog

    Creating multimedia web trainings by Microsoft Producer

    • 0 Comments
    This demo was created using Microsoft Office XP. This is an added value provided freely to Microsoft Office customers.
     
    * Try it online (make sure you allow installation of Office component on your computer, when prompted)
     
    * Download and try it locally
     
    MSProducerVN
  • Que Nguyen's Microsoft techology blog

    Scripting - Sample Users/Group creation in AD

    • 0 Comments
    Set oRoot = GetObject("LDAP://rootDSE")
    Set oDomain = GetObject("LDAP://" & oRoot.Get("defaultNamingContext"))
    Set oOU=oDomain.Create("organizationalUnit", "ou=My Corp Users")
    oOU.SetInfo

    Set oUser = oOU.Create("User", "cn=Director One")
    oUser.Put "sAMAccountName", "director1"
    oUser.SetInfo
    oUser.givenName="Director One"
    oUser.displayName="Director One"
    oUser.title="Managing Director"
    oUser.department="Director Dept"
    oUser.mail="director1@mycompany.com.vn"
    oUser.employeeID=789
    SetCommonProps(oUser)
     
    Set oUser = oOU.Create("User", "cn=Manager One")
    oUser.Put "sAMAccountName", "manager1"
    oUser.SetInfo
    oUser.givenName="Manager One"
    oUser.displayName="Manager One"
    oUser.title="Sales Manager"
    oUser.department="Sales & Marketing Dept"
    oUser.mail="manager1@mycompany.com.vn"
    oUser.employeeID=678
    oUser.manager="CN=Director One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    SetCommonProps(oUser)

    Set oUser = oOU.Create("User", "cn=Staff One")
    oUser.Put "sAMAccountName", "staff1"
    oUser.SetInfo
    oUser.givenName="Staff One"
    oUser.displayName="Staff One"
    oUser.title="Sales Executive"
    oUser.department="Sales & Marketing Dept"
    oUser.mail="staff1@mycompany.com.vn"
    oUser.employeeID=123
    oUser.manager="CN=Manager One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    SetCommonProps(oUser)
     
    Set oUser = oOU.Create("User", "cn=Staff Two")
    oUser.Put "sAMAccountName", "staff2"
    oUser.SetInfo
    oUser.givenName="Staff Two"
    oUser.displayName="Staff Two"
    oUser.title="Cashier"
    oUser.department="Sales & Marketing Dept"
    oUser.mail="staff2@mycompany.com.vn"
    oUser.employeeID=234
    oUser.manager="CN=Manager One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    SetCommonProps(oUser)
     
    Set oUser = GetObject("LDAP://CN=Administrator,CN=Users,DC=mycompany,DC=com,DC=vn")
    oUser.givenName="Administrator"
    oUser.displayName="Administrator"
    oUser.title="System Admin"
    oUser.department="Director Dept"
    oUser.mail="administrator@mycompany.com.vn"
    oUser.employeeID=012
    oUser.manager="CN=Director One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    oUser.SetInfo
    SetCommonProps(oUser)

    Set oGroup = oOU.Create("Group", "cn=Directors") 'Global group creation
    oGroup.Put "sAMAccountName", "Directors"
    oGroup.SetInfo
    oGroup.member="CN=Director One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    oGroup.SetInfo
     
    Set oGroup = oOU.Create("Group", "cn=Chief Accountants")
    oGroup.Put "sAMAccountName", "ChiefAccountants"
    oGroup.SetInfo
    oGroup.member="CN=Manager One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    oGroup.SetInfo
     
    Set oGroup = oOU.Create("Group", "cn=Accountants") 'Global group creation
    oGroup.Put "sAMAccountName", "Accountants"
    oGroup.SetInfo
    oGroup.member="CN=Staff One,OU=My Corp Users,DC=mycompany,DC=com,DC=vn"
    oGroup.SetInfo

    Wscript.Echo "Users/Groups Creation Successul!"
    sub SetCommonProps(oUser)
      oUser.SetPassword "P@ssw0rd"
      oUser.AccountDisabled = False
      oUser.company="My Company"
      oUser.streetAddress="123 XYZ Street"
      oUser.l="Hanoi"
      oUser.c="VN"
      oUser.telephoneNumber="+84-4-123-45678"
      oUser.mobile="+84-9-1234-5678"
      oUser.userAccountControl=66080 '0x10220=PASSWD_NOTREQD|NORMAL_ACCOUNT|DONT_EXPIRE_PASSWD)
      oUser.SetInfo
    end sub
  • Que Nguyen's Microsoft techology blog

    Windows Server scripting - first steps

    • 0 Comments
    ************ Server machines << note the number 1 at the end of netsh command, which is for the metric of the 192.168.1.10 gateway >>
    netsh interface ip set address name="Local Area Connection" static 192.168.1.1 255.255.255.0 192.168.1.10 1
    netsh interface ip set dns     name="Local Area Connection" static 192.168.1.1 primary
     
    netdom renamecomputer %COMPUTERNAME% /NewName HAN-SRV-01 /ReBoot:5
    netdom join %COMPUTERNAME% /domain:MYCOMPANY /ReBoot:5
     
    ************ Domain controllers for new domains
    UNATTEND.TXT

    [DCInstall]
    DNSOnNetwork=No
    DomainLevel=3
    DomainNetBiosName=MYCOMPANY
    ForestLevel=3
    NewDomain=Forest
    NewDomainDNSName=mycompany.com.vn
    RebootOnCompletion=Yes
    ReplicaOrNewDomain=Domain
    SafeModeAdminPassword=P@ssw0rd
     
    dcpromo /unattend:unattend.txt
     
    ************ Additional domain controllers
    [DCInstall]
    UserName=Administrator
    Password=P@ssw0rd
    UserDomain=mycompany.com.vn
    DatabasePath=c:\windows\ntds
    LogPath=c:\windows\ntds
    SysVolPath=c:\windows\sysvol
    SafeModeAdminPassword=P@ssw0rd
    ReplicaOrNewDomain=Replica
    ReplicaDomainDNSName=mycompany.com.vn
    ReplicationSourceDC=han-srv-01.mycompany.com.vn
    InstallDNS=yes
    ConfirmGC=yes
    RebootOnCompletion=yes
     
    *********** additional RODC on a Server Core
    ; DCPROMO unattend file, automatically generated by dcpromo, by clicking the Export button at the end of the dcpromo wizard on a previous additional domain controller
    ; Usage: ;   dcpromo.exe /unattend:C:\RODC-unattend.txt
    ; You may need to fill in password fields prior to using the unattend file. ; If you leave the values for "Password" and/or "DNSDelegationPassword" as "*", then you will be asked for credentials at runtime. Please use the domain admin, not the local admin of the Server Core
    [DCInstall]
    ; Read-Only Replica DC promotion
    ReplicaOrNewDomain=ReadOnlyReplica
    ReplicaDomainDNSName=mycompany.com.vn
    DelegatedAdmin="Administrator"
    SiteName=Default-First-Site-Name
    InstallDNS=Yes
    ConfirmGc=Yes
    CreateDNSDelegation=No
    UserDomain=mycompany.com.vn
    UserName=mycompany\administrator
    Password=*
    DatabasePath="C:\Windows\NTDS"
    LogPath="C:\Windows\NTDS"
    SYSVOLPath="C:\Windows\SYSVOL"
    ; Set SafeModeAdminPassword to the correct value prior to using the unattend file
    SafeModeAdminPassword=P@ssw0rd
    ; Run-time flags (optional)
    ; CriticalReplicationOnly=Yes
    ; RebootOnCompletion=Yes
     
    ************ Client machines
    netsh interface ip set address name="Local Area Connection" dhcp
  • Que Nguyen's Microsoft techology blog

    In Use File Replacement

    • 0 Comments

    In order to replace running (being used) files, we can use the Windows MoveFileEx API. This allows the update to be made during the work hours, and after a PC/server restart, the new file will be available to use. 

    The below is the illustration of  how to use it within a VB6 command line app.
    My VB6 InUse command line app (VB6 source code, and how to develop command-line VB6 app with support for command line parameters)
    Another Sample InUse file replacement code for download

  • Que Nguyen's Microsoft techology blog

    A quick look at IPSec (IPSecurity)

    • 0 Comments
  • Que Nguyen's Microsoft techology blog

    SMS 2003 demo video, as of Oct 2004

    • 0 Comments

    1.     1.  SMS 2003 installation (2M)

    2.     2.  Software deployment

    a.       LVTD deployment (0.8M)

    b.      Office 2003 on WinXP deployment (2.3M)

    c.       Upgrade Win2KPro-04 to WinXP (2M)

    3.     3.  Software update deployment – to the Model PC

    a.       Deploying Windows hotfixes to the Model PC (1.9M)

    b.      Deploying a Office Service Pack to the Model PC (0.8M)

    4.     3.  Software update deployment – to the remaining PCs

    a.       Deploying Windows hotfixes to the remaining Win2KPro PCs (1.2M)

    b.      Updating Service Pack 4 to all Win2KPro PCs and troubleshooting (1.4M)

    5.     4.  Query and Report customization (1.8M)

    6.     5.  Creating a customized collection (0.3M)

    7.     6.  Legacy client support for Workgroup PCs (1.5M)

          7.  SMS demo notes doc (0.1M)

  • Que Nguyen's Microsoft techology blog

    Test driving Windows Storage Server!

    • 3 Comments
    Just install the 30 day eval of the Microsoft iSCSI Software Target to your normal Windows Server.
Page 1 of 3 (23 items) 123