Archive for March, 2010

Scripts I Still Need to Edit for Upload

AutoIT
    OfficeSetup.exe -Proof of concept for IT EULA before Install
    ClientPassword.exe – Set Windows client Administrator password
    ServerPassword.exe – Set Windows Administrator server password
    StartOblivion.exe – Proof of concept for mount ISO and start exe

Batch
    Logon Scripts:
        mapDrives.bat                    – Map Drives
        wsus-client-detect.bat            – Run Windows Client Automatic Update
        register-dns.bat                – Register DNS (in case DHCP doesnt for you)
        printer-install.bat                – Install Printers from local site
        copy-tools.bat                    – Copy IT Tools, Sysinterals, etc locally
        exchange-profile.bat            – Setup Outlook
        3rd-party-software-check.bat    – Check for Virus Scan, Acrobat, Flash
        homeLogon.bat                    – Run Users own Batch script in their home dir
        checkAdmin.bat                    – Make sure Doman Admins and other admins are… admins and set local admin password
        spybot.bat                        – Update Spybot inf installed
        bginfo.bat                        – If server setup BGInfo from Sysinternals
        nsclient.bat                    – If server configure Nagios client
        restart-alg.bat                    – If Windows XP restart ALG Service (workaround for XP bug)
        report.bat                        – Writes session information to a hidden share/log, which is latter parsed by the ‘post logon script’ on a DC
    logonserver_log_parser.bat            – Post logon script, parses log created by report.bat and preforms actions on each client. For example system audits or adding the system to auto setup process.
    createDClogsFile.bat                – Create and archive report logs
    createDClogsShare.bat                – Create and setup report log share on DC
    default-client-ou.bat                – Move systems in Computer containers to default OU based on system name
    disable-account.cmd                    – Remove from groups, set up email forward to manager, re-assign all direct reports to manager, disable account delete mailbox
    give-local-admin.bat                – Left over from previous Setup
    healthcheck.bat                        – Check if Windows Update confgiured, run Windows
    old-accounts.bat                    – Disable user accounts that haven’t logged in in 8 weeks, delete computer accounts
    shutemdown.bat                        – Shut down all Windows Servers then DCs (for site power outages)
    LogonLimts.bat                        – Count total logon time for the day, force log off when threshold hit
    CrawlDomain-netdom                    – Connect to all systems on domain using netdom and run command
    CrawlDomain-dsquery                    – Connect to all systems on domain using a dsquery and run command
    CrawlDomain-browstat                – Connect to all systems on domain using browstat and run command

    Setup:
        ConnectToShare.bat                – Connect to \setupsetup$ and run next script
        Setup_Enviroment.bat            – Setup enviroment, join domain, rename based on Serial number, install apps, and more
        Prepare_for_User.bat            – Add username (based on system name) to local admins, active Windows 7 if needed, and more

    Tools:
        ifup.cmd                        – If system up do command. (rdp, http, etc)
        go.cmd                            – Change Directory to shortcut, sys, bin, doc, win, etc
        open.cmd                        – Open explorer to shortcut, sys, bin, doc, win, etc
        whenup.cmd                        – Wait for system to go down then wait for it to come up then do command
        rdp.cmd                            – Remote Desktop to host
    …and more
VBScript
    server_downtime.wsf                    – Log off script to tell Nagios server is shuting down and should be back up in 15 minutes, pause monitoring for 15 minutes
    getSerial.vbs                        – Get system serial number (used with serial number to system naming tying)
    ejectDVD.vbs                        – Ejects DVD *yawn*
    check_disks.wsf                        – Checks all ‘partiions’ free space (Nagios Plugin)
    check_disk_and_eMail.vbs            – Checks all ‘partiions’ free space (Stand-alone)
    sendMail.vbs                        – Umm sends mail DUH!
    …and more
PowerShell
    switch-wifi-auto.ps1                – Turns off Wifi adapter if Ethernet adapter is connected.
    remove-bloatware.ps1                – Remove known ‘bad’ entries from auto start locations in Registry
    …and more

PowerShell Script Uninstall-Toolbars.ps1

#***********************************************************************
# "Uninstall-Toolbars.ps1"
#
# Written by Aaron Wurthmann (aaron <AT> wurthmann <DOT> com)
#
# If you edit please keep my name as an original author and
# keep me apprised of the changes, see email address above.
# This code may not be used for commercial purposes.
# You the executor,runner,user accept all liability.
# This code comes with ABSOLUTELY NO WARRANTY.
# You may redistribute copies of the code under the terms of the GPL v2.
# -----------------------------------------------------------------------
# Prerequisite:
# Should work with both PowerShell v1 and v2. I wrote and tested it on XP
# as well was Windows 7 x64. Make sure to have your execution mode is set
# properly. PSH> get-help about_Execution_Policies
# In addition, WASP, Windows Automation Snapin for PowerShell, was used
# for the macros to run and click items as needed, it is not mandatory.
# -----------------------------------------------------------------------
# 2010.03.15 ver 1.2
#
# Summary:
# Removes software based on display name shown in "Add Remove Programs".
# In the majority of cases it just runs whatever uninstall program the
# program claims will uninstall itself. In a few cases a macro is run.
# See $apps array section and comments to add to the list of programs.
#
# Known Bugs:
# At this time I have noticed an issue with the "Bing Bar" attemping to
# re-install itself. Actually what is happening is a related install
# 'Bing Bar Platform' is being launched and as a result it asks if you
# want to reinstall. I haven't looked into solving this just yet. My advice
# at the moment is... don't reinstall it. *laugh*
#************************************************************************

#Function Section - Dont Touch, unless you Know what you are doing.
function Get-AppInfo {
    Param([string]$filter)
    $regkey=Get-Item "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionUninstall"
    $SubKeyNames = $regkey.GetSubKeyNames()
    foreach($SubKeyName in $SubKeyNames){
        $SubKeyString="$regkey$SubKeyName" -replace "HKEY_LOCAL_MACHINE\","HKLM:"
        $SubKey=Get-Item $SubKeyString
        $DisplayName=$SubKey.GetValue('DisplayName')
        If ($DisplayName -like "*$filter*"){
            $DisplayName
            $SubKey.GetValue('UninstallString')
        }
    }
}

function Remove-MSI {
    Param([string]$uninstallString)
    Stop-Webbrowser
    $uninstall=$uninstallString.Replace('/I','/X')
    $uninstallCmd=$uninstall.split(' ')[0]
    $uninstallParam=$uninstall.split(' ')[1]
    & $uninstallCmd $uninstallParam /qn
}

function Remove-Install {
    Param([string]$uninstallString)
    Stop-Webbrowser
    $uninstallCmd=$UninstallString.split('"')[1]
    if ($uninstallCmd){
        $uninstallCmd=$uninstallCmd.Trim()
        $uninstallParam=$UninstallString.split('"')[2]
        if ($uninstallParam){
            $uninstallParam=$uninstallParam.Trim()
        }
    }
    ELSE{
        $uninstallCmd=$UninstallString.split('/')[0].Trim()
        $uninstallParam=$UninstallString.split('/')[1]
        if ($uninstallParam){
            $uninstallParam='/' +$uninstallParam.Trim()
        }
    }

    & $uninstallCmd $uninstallParam
}

function Stop-Webbrowser {
    Get-Process | Where {$_.Name -eq "iexplore"} | kill
    #Get-Process | Where {$_.Name -eq "firefox"} | kill
}

function Remove-AltavistaToolbar {
    Param([string]$uninstallString)
    Stop-Webbrowser
    & $UninstallString.split('/')[0]
    Add-PSSnapin WASP -ea "SilentlyContinue"
    Select-Window > $nul
    if ($? -eq $True){
        Start-Sleep 1
        Select-Window uninstall | Send-Keys "y"
        Start-Sleep 1
        Stop-Webbrowser
    }
    ELSE{
        Remove-Install $UninstallString
    }
}

function Remove-BingBar {
    Param([string]$uninstallString)
    Stop-Webbrowser
    & $UninstallString.split('/')[0]
    Add-PSSnapin WASP -ea "SilentlyContinue"
    Select-Window > $nul
    if ($? -eq $True){
        Start-Sleep 1
        Select-Window InstallManager | Send-Keys "{TAB}","{ENTER}"
        Stop-Webbrowser
    }
    ELSE{
        Remove-Install $UninstallString
    }
}

function Remove-Yahoo!Toolbar {
    Param([string]$uninstallString)
    Stop-Webbrowser
    & $UninstallString.split('/')[0]
    Add-PSSnapin WASP -ea "SilentlyContinue"
    Select-Window > $nul
    if ($? -eq $True){
        Start-Sleep 1
        Select-Window UNYT_W~1 | Send-Keys "y"
        Start-Sleep 2
        Select-Window BU_ | Select-ChildWindow | Send-Keys "n"
        Start-Sleep 1
        Select-Window BU_ | Send-Keys "c"
        Start-Sleep 1
        Stop-Webbrowser
    }
    ELSE{
        Remove-Install $UninstallString
    }
}
#End Fuction Section

#    Add Apps here that you want to remove. Use the exact name as it appears in "Add Remove Programs"
#    For all toolbars uncomment 'Toolbar' and remove all other toolbars except 'Bing Bar'
$apps=@(
    'Ask Toolbar',
    'Altavista Toolbar',
    'Bing Bar',
    'Google Toolbar for Internet Explorer',
    'Yahoo! Toolbar';
    #'Toolbar';
)

#These apps have extra routines, so there are custom functions.
#WASP, Windows Automation Snapin for PowerShell, is required for macros to run
$macroapps=@(
    'Altavista Toolbar',
    'Bing Bar',
    'Yahoo! Toolbar';
)
#End Editable Section

#Main
if ($apps){
    foreach($app in $apps){
        $AppInfo=(Get-AppInfo $app)
        $DisplayName=$AppInfo[0]
        $UninstallString=$AppInfo[1]
        if ($UninstallString -like "*MsiExec*"){
            Remove-MSI $UninstallString
        }
        Else{
            if ($macroapps -contains $DisplayName){
                $cutomRemove='Remove-' + $DisplayName.Replace(' ','')
                & $cutomRemove
            }
            ELSE{
                Remove-Install $UninstallString
            }
        }
    }
}

PowerShell Script Install-Printers.ps1

#***********************************************************************
# "Install-Printers.ps1"
#
# Written by Aaron Wurthmann (aaron <AT> wurthmann <DOT> com)#

# If you edit please keep my name as an original author and
# keep me apprised of the changes, see email address above.
# This code may not be used for commercial purposes.
# You the executor,runner,user accept all liability.
# This code comes with ABSOLUTELY NO WARRANTY.
# You may redistribute copies of the code under the terms of the GPL v2.
# -----------------------------------------------------------------------
# 2010.03.01 ver 1.2
#
# Summary:
# Enumerates Print shares on Print Server and installs them.
#
# Known Limitations:
# In its present form the script will work only with a single site and
# a single print server. You'll have to edit it to do more if need be.
#************************************************************************

#Function Section - Dont Touch, unless you Know what you are doing.
function Test-Port{
    Param([string]$srv="localhost",$port=135,$timeout=300)
    $ErrorActionPreference = "SilentlyContinue"
    $tcpclient = new-Object system.Net.Sockets.TcpClient
    $iar = $tcpclient.BeginConnect($srv,$port,$null,$null)
    $wait = $iar.AsyncWaitHandle.WaitOne($timeout,$false)
    if(!$wait)
    {
        $tcpclient.Close()
        Return $false
    }
    else
    {
        $error.Clear()
        $tcpclient.EndConnect($iar) | out-Null
        Return $true
        $tcpclient.Close()
    }
}

function Add-Printer{
    Param([string]$server="",$printer="")
    if (!$server -or !$printer){
        exit
    }
    if (!$net){
        $net = new-Object -com WScript.Network
    }
    $PrinterPath = "\" + $server + "" + $printer
    write-host "Attempting to Silent Install:" $PrinterPath
    $net.AddWindowsPrinterConnection($PrinterPath)
}
# End Function Section

# Print Server
[string]$strPrintserver = "PRINTSERVER"

# Exempt Sites/DCs - Add DCs here for sites you want to skip
$DCs=@(
    '\DC101',
    '\DC02';
)

[string]$strLogonserver = ($env:logonserver)
[string]$strComputername = ("\" + $env:computername)
$net = new-Object -com WScript.Network

if ($DCs -contain $strLogonserver) {
    exit
}

if ($strLogonserver -eq $strComputername -or $strComputername -eq "\" + $strPrintserver){
    exit
}

[string]$portResult=Test-Port $strPrintserver 135 1
if($portResult -eq $false){
    exit
}

$netviewResult=@(net view \$strPrintserver | Select-String Print)
$printerShares = $netviewResult |foreach-object { $_.toString().Split('  +')[0] }

$errorActionPreference="SilentlyContinue"

$printerShares | ForEach-Object {
    Add-Printer $strPrintserver $_
}

PowerShell Script Install-WindowsUpdates.ps1

#***********************************************************************
# "Install-WindowsUpdates.ps1"
#
# Re-posted by Aaron Wurthmann (aaron <AT> wurthmann <DOT> com)
#
# If you edit please keep my name as an author and
# keep me apprised of the changes, see email address above.
# This code may not be used for commercial purposes.
# You the executor,runner,user accept all liability.
# This code comes with ABSOLUTELY NO WARRANTY.
# You may redistribute copies of the code under the terms of the GPL v2.
# -----------------------------------------------------------------------
# 2010.03.01 ver 1.1
#
# Summary:
# Gets and installed Windows Updates
#
# Background:
# A friend of mine posted this code into a chat Window one day to aid me
# with a project I was working on. Converting my batch scripts to PowerShell
# He couldn't remember where he got the code from so as a result I can't give
# the original author the credit they deserve. I made some very minor edits
# in order to change the code/script to what I use it for. Mainly a module
# to my Windows Logon Script.
#************************************************************************

clear-host
Write-host "Starting Update Process..." -foregroundcolor blue
Write-host ""
$UpdateSession = New-Object -com Microsoft.Update.Session
$UpdateSearcher = $UpdateSession.CreateupdateSearcher()
$SearchResult =  $UpdateSearcher.Search("IsAssigned=1 and IsHidden=0 and IsInstalled=0")
$UpdateLowNumber = 0
$UpdateHighNumber = 1
$NumberofUpdates = $searchResult.Updates.Count
while ($UpdateHighNumber -le $NumberofUpdates) {
$UpdatesToDownload = New-Object -com Microsoft.Update.UpdateColl
$Update = $searchResult.Updates.Item($UpdateLowNumber)
if ($Update.EulaAccepted -eq 0) {$Update.AcceptEula()}
[void]$UpdatesToDownload.Add($Update)
$Downloader = $UpdateSession.CreateUpdateDownloader()
$Downloader.Updates = $UpdatesToDownload
[void]$Downloader.Download()
$UpdatesToInstall = New-Object -com Microsoft.Update.UpdateColl
[void]$UpdatesToInstall.Add($Update)
$Title = $update.Title
$KBArticleIDs = $update.KBArticleIDs
$SecurityBulletinIDs = $update.SecurityBulletinIDs
$MsrcSeverity = $update.MsrcSeverity
$LastDeploymentChangeTime = $update.LastDeploymentChangeTime
$MoreInfoUrls = $update.MoreInfoUrls
Write-host "Installing Update $UpdateHighNumber of $NumberofUpdates"
Write-host "Title: $Title"
if ($KBArticleIDs -ne "") {Write-host "KBID: $KBArticleIDs"}
if ($SecurityBulletinIDs -ne "") {write-host "Security Bulletin: $SecurityBulletinIDs"}
if ($MsrcSeverity -eq "Critical") {Write-host "Rating: $MsrcSeverity" -foregroundcolor red} else {Write-host "Rating: $MsrcSeverity"}
if ($LastDeploymentChangeTime -ne "") {Write-host "Dated: $LastDeploymentChangeTime"}
if ($MoreInfoUrls -ne "") {Write-host "$MoreInfoUrls"}
$Installer = $UpdateSession.CreateUpdateInstaller()
$Installer.Updates = $UpdatesToInstall
$InstallationResult = $Installer.Install()
Write-host "--------------------------------------------"
if ($InstallationResult.ResultCode -eq "2") {Write-host "  Installation Succeeded" -foregroundcolor green}  else {Write-host "  INSTALLATION FAILED, check event log for details" -foregroundcolor red}
if ($InstallationResult.RebootRequired -eq "False") {Write-host "  Reboot not required" -foregroundcolor green} else {Write-host "  REBOOT REQUIRED" -foregroundcolor red}
Write-host "--------------------------------------------"
Write-host ""
Write-host ""
$Title = ""
$KBArticleIDs =  ""
$SecurityBulletinIDs =  ""
$MsrcSeverity =  ""
$LastDeploymentChangeTime =  ""
$MoreInfoUrls =  ""
$UpdateLowNumber = $UpdateLowNumber + 1
$UpdateHighNumber = $UpdateHighNumber + 1
if ($ProgressValue -lt $NumberofUpdates) {$ProgressValue = $ProgressValue + 1}
}
$ComputerStatus = New-Object -com Microsoft.Update.SystemInfo
 if ($ComputerStatus.RebootRequired -eq 1) {Write-host "A Reboot is Required"}

PowerShell Script Register-OutlookProfile.ps1

Project Objective:
Convert existing Batch logon script, Configure-Outlook.bat, to PowerShell, while doing so improve upon the proper Outlook version enumeration with a registry check.

Problem to be solved:
Current script has been written in Batch. Getting Batch logon scripts to run the same way they ran in Windows XP, on Windows Vista and Windows 7 has become a game of hit and miss. This script, in its Batch form, runs just fine. So re-writing it in PowerShell is merely for academic and consistency purposes.

Suggestions:
None.. Just re-write it and learn.

Future Versions:
The current version is not passing the variables to the environment that is launched at the end of the script. I am sure this is an error on my part. I just need to sit down and figure out what I am doing wrong.

# WARNING WORK IN PROGRESS
# This script is currently not working as it should.
# I am looking into why and debugging. It is based on a
# working batch version, its just a matter of getting it
# to work in PowerShell
# – Aaron Wurthmann

function Test-ServerOS {
    if ($OS.Caption -like "*Server*"){
        exit
    }
}

function Test-Profile {
    if ($OS.Version -gt 6.0){
        $strProfileDir="$env:USERPROFILEAppDataRoamingMicrosoftOutlook"
    }
    Else {
        $strProfileDir="$env:USERPROFILELocal SettingsApplication DataMicrosoftOutlook"
    }
    $ProfileResult=test-path $strProfileDir
    if ($ProfileResult=$true){
        exit
    }
}

function Get-Outlook {
    $regOutlook=Get-Itemproperty -path "HKLM:SoftwareMicrosoftWindowsCurrentversionApp Pathsoutlook.exe"
    $getOutlook=$regOutlook.path +'outlook.exe'
    $outlook=Get-Item $getOutlook
}

function Test-Config {
    $ConfigResult=test-path $config
    if ($ConfigResult=$false){
        exit
    }
}

$env:ExchServer="EXCHANGE.DOMAIN.EXT"
$env:OWAServer="OWA.DOMAIN.EXT"
$env:MailProfile="Outlook"
$env:ExchProfile="EXCHANGE-PROFILE.PRF"
$config="$env:logonservernetlogonmodulesexchange-profiles$env:ExchProfile"

$OS=Get-WmiObject -Class win32_OperatingSystem -namespace "rootCIMV2"
Test-ServerOS
Test-Profile
Get-Outlook
Test-Config
& $outlook /importprf $config

Batch Script Configure-Outlook.bat

Project Objective:
Lower TCO (total cost of ownership) on Outlook configurations while setting everyone’s Outlook/Exchange setup to the same uniform settings. (Use cache mode and use RPC over HTTPS)

Problem to be solved:
Lower TCO and IT man hours spent on configuring Outlook.

Suggestions:
Teach users how to configure Outlook/Exchange themselves – REJECTED. Users cannot be expected to read instructions that is what IT is for.
Accepted solution: Use Office Customization Wizard to create an Outlook Profile. Check at each logon if Outlook is configure, if it is not load the corresponding Outlook/Exchange profile.

Future Versions:
Future versions will use PowerShell as I am migrating to PowerShell. Using PowerShell’s native syntax you can enumerate Outlook.exe’s location and call that versus static entries in the file or using reg.exe

rem #***********************************************************************
rem # "Configure-Outlook.bat"
rem #
rem # Written by Aaron Wurthmann (aaron <AT> wurthmann <DOT> com)
rem # If you edit please keep my name as an original author and
rem # keep me apprised of the changes, see email address above.
rem # This code may not be used for commercial purposes.
rem # You the executor,runner,user accept all liability.
rem # This code comes with ABSOLUTELY NO WARRANTY.
rem # You may redistribute copies of the code under the terms of the GPL v2.
rem # -----------------------------------------------------------------------
rem # 2010.03.01 ver FINAL
rem #
rem # Summary:
rem # Configures Outlook using referenced Outlook Profile, created by Office
rem # Custom Install Wizard.
rem # Future Versions:
rem # Future versions will use PowerShell as I am migrating to PowerShell. 
rem # Using PowerShell’s native syntax you can enumerate Outlook.exe’s
rem # location and call that versus static entries in the file or using reg.exe
rem #************************************************************************

@echo off rem title Configure Outlook Module set errorlevel= set strProfileDir= set strOutlookDir= set ExchServer=EXCHANGE.DOMAIN.EXT set OWAServer=OWA.DOMAIN.EXT set MailProfile=Outlook set ExchProfile=exch_cach_ssl.PRF rem Check for Server OS, if server OS exit %logonserver%netlogontoolsREG.EXE query "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProductName" | findstr Server>nul && goto :EoF rem Determine Outlook version, 2003 or 2007 if exist "%ProgramFiles(x86)%Microsoft OfficeOFFICE11OUTLOOK.EXE" set strOutlookDir=%ProgramFiles(x86)%Microsoft OfficeOFFICE11 if exist "%ProgramFiles(x86)%Microsoft OfficeOFFICE12OUTLOOK.EXE" set strOutlookDir=%ProgramFiles(x86)%Microsoft OfficeOFFICE12 if exist "%ProgramFiles%Microsoft OfficeOFFICE11OUTLOOK.EXE" set strOutlookDir=%ProgramFiles%Microsoft OfficeOFFICE11 if exist "%ProgramFiles%Microsoft OfficeOFFICE12OUTLOOK.EXE" set strOutlookDir=%ProgramFiles%Microsoft OfficeOFFICE12 if not exist "%strOutlookDir%" goto :EoF rem Determine XP, Vista or Later ver | findstr /c:"Version 6.">nul && set strProfileDir=%USERPROFILE%AppDataRoamingMicrosoftOutlook ver | findstr /c:"Version 5.">nul && set strProfileDir=%USERPROFILE%Local SettingsApplication DataMicrosoftOutlook rem If Profile Exist Exit if exist "%strProfileDir%*.*" goto :EoF rem Check for Account Exclusions, If Excluded Exit FOR /F "usebackq delims== " %%a IN (%logonserver%netlogonmodulesexclusionsexchange.log) DO if /i '%%a'=='%username%' goto :EoF :import rem Import Profle start "" "%strOutlookDir%OUTLOOK.EXE" /importprf %logonserver%netlogonmodulesexchange-profiles%ExchProfile%

Example Outlook Profile – exch_cach_ssl.PRF


; **************************************************************
; Section 1 - Profile Defaults
; **************************************************************

[General]
Custom=1
ProfileName=Exchange with SSL Profile
DefaultProfile=Yes
OverwriteProfile=Yes
ModifyDefaultProfileIfPresent=TRUE
; **************************************************************
; Section 2 - Services in Profile
; **************************************************************

[Service List]
ServiceX=Microsoft Outlook Client
ServiceEGS=Exchange Global Section
Service1=Microsoft Exchange Server
ServiceEGS=Exchange Global Section

;***************************************************************
; Section 3 - List of internet accounts
;***************************************************************

[Internet Account List]

;***************************************************************
; Section 4 - Default values for each service.
;***************************************************************

[ServiceX]
CachedExchangeMode=0x00000002
CachedExchangeSlowDetect=TRUE

[ServiceEGS]
CachedExchangeConfigFlags=0x00000100
MailboxName=%UserName%
HomeServer=%ExchServer%
RPCoverHTTPflags=0x002b
RPCProxyServer=%OWAServer%
RPCProxyPrincipalName=
RPCProxyAuthScheme=0x0001

[Service1]
OverwriteExistingService=Yes
UniqueService=Yes
MailboxName=%UserName%
HomeServer=%ExchServer%
OfflineAddressBookPath=%USERPROFILE%local settingsapplication datamicrosoftoutlook
OfflineFolderPath=%USERPROFILE%local settingsapplication datamicrosoftoutlookoutlook.ost
AccountName=Microsoft Exchange Server

;***************************************************************
; Section 5 - Values for each internet account.
;***************************************************************

;***************************************************************
; Section 6 - Mapping for profile properties
;***************************************************************

[Microsoft Exchange Server]
ServiceName=MSEMS
MDBGUID=5494A1C0297F101BA58708002B2A2517
MailboxName=PT_STRING8,0x6607
HomeServer=PT_STRING8,0x6608
OfflineAddressBookPath=PT_STRING8,0x660E
OfflineFolderPath=PT_STRING8,0x6610

[Exchange Global Section]
SectionGUID=13dbb0c8aa05101a9bb000aa002fc45a
MailboxName=PT_STRING8,0x6607
HomeServer=PT_STRING8,0x6608
RPCoverHTTPflags=PT_LONG,0x6623
RPCProxyServer=PT_UNICODE,0x6622
RPCProxyPrincipalName=PT_UNICODE,0x6625
RPCProxyAuthScheme=PT_LONG,0x6627
CachedExchangeConfigFlags=PT_LONG,0x6629

[Microsoft Mail]
ServiceName=MSFS
ServerPath=PT_STRING8,0x6600
Mailbox=PT_STRING8,0x6601
Password=PT_STRING8,0x67f0
RememberPassword=PT_BOOLEAN,0x6606
ConnectionType=PT_LONG,0x6603
UseSessionLog=PT_BOOLEAN,0x6604
SessionLogPath=PT_STRING8,0x6605
EnableUpload=PT_BOOLEAN,0x6620
EnableDownload=PT_BOOLEAN,0x6621
UploadMask=PT_LONG,0x6622
NetBiosNotification=PT_BOOLEAN,0x6623
NewMailPollInterval=PT_STRING8,0x6624
DisplayGalOnly=PT_BOOLEAN,0x6625
UseHeadersOnLAN=PT_BOOLEAN,0x6630
UseLocalAdressBookOnLAN=PT_BOOLEAN,0x6631
UseExternalToHelpDeliverOnLAN=PT_BOOLEAN,0x6632
UseHeadersOnRAS=PT_BOOLEAN,0x6640
UseLocalAdressBookOnRAS=PT_BOOLEAN,0x6641
UseExternalToHelpDeliverOnRAS=PT_BOOLEAN,0x6639
ConnectOnStartup=PT_BOOLEAN,0x6642
DisconnectAfterRetrieveHeaders=PT_BOOLEAN,0x6643
DisconnectAfterRetrieveMail=PT_BOOLEAN,0x6644
DisconnectOnExit=PT_BOOLEAN,0x6645
DefaultDialupConnectionName=PT_STRING8,0x6646
DialupRetryCount=PT_STRING8,0x6648
DialupRetryDelay=PT_STRING8,0x6649

[Personal Folders]
ServiceName=MSPST MS
Name=PT_STRING8,0x3001
PathToPersonalFolders=PT_STRING8,0x6700 
RememberPassword=PT_BOOLEAN,0x6701
EncryptionType=PT_LONG,0x6702
Password=PT_STRING8,0x6703

[Unicode Personal Folders]
ServiceName=MSUPST MS
Name=PT_UNICODE,0x3001
PathToPersonalFolders=PT_STRING8,0x6700 
RememberPassword=PT_BOOLEAN,0x6701
EncryptionType=PT_LONG,0x6702
Password=PT_STRING8,0x6703

[Outlook Address Book]
ServiceName=CONTAB

[LDAP Directory]
ServiceName=EMABLT
ServerName=PT_STRING8,0x6600
UserName=PT_STRING8,0x6602
UseSSL=PT_BOOLEAN,0x6613
UseSPA=PT_BOOLEAN,0x6615
DisableVLV=PT_LONG,0x6616
DisplayName=PT_STRING8,0x3001
ConnectionPort=PT_STRING8,0x6601
SearchTimeout=PT_STRING8,0x6607
MaxEntriesReturned=PT_STRING8,0x6608
SearchBase=PT_STRING8,0x6603

[Microsoft Outlook Client]
SectionGUID=0a0d020000000000c000000000000046
FormDirectoryPage=PT_STRING8,0x0270
WebServicesLocation=PT_STRING8,0x0271
ComposeWithWebServices=PT_BOOLEAN,0x0272
PromptWhenUsingWebServices=PT_BOOLEAN,0x0273
OpenWithWebServices=PT_BOOLEAN,0x0274
CachedExchangeMode=PT_LONG,0x041f
CachedExchangeSlowDetect=PT_BOOLEAN,0x0420

[Personal Address Book]
ServiceName=MSPST AB
NameOfPAB=PT_STRING8,0x001e3001
Path=PT_STRING8,0x001e6600
ShowNamesBy=PT_LONG,0x00036601

; ************************************************************************
; Section 7 - Mapping for internet account properties.  DO NOT MODIFY.
; ************************************************************************

[I_Mail]
AccountType=POP3
;--- POP3 Account Settings ---
AccountName=PT_UNICODE,0x0002
DisplayName=PT_UNICODE,0x000B
EmailAddress=PT_UNICODE,0x000C
;--- POP3 Account Settings ---
POP3Server=PT_UNICODE,0x0100
POP3UserName=PT_UNICODE,0x0101
POP3UseSPA=PT_LONG,0x0108
Organization=PT_UNICODE,0x0107
ReplyEmailAddress=PT_UNICODE,0x0103
POP3Port=PT_LONG,0x0104
POP3UseSSL=PT_LONG,0x0105
; --- SMTP Account Settings ---
SMTPServer=PT_UNICODE,0x0200
SMTPUseAuth=PT_LONG,0x0203
SMTPAuthMethod=PT_LONG,0x0208
SMTPUserName=PT_UNICODE,0x0204
SMTPUseSPA=PT_LONG,0x0207
ConnectionType=PT_LONG,0x000F
ConnectionOID=PT_UNICODE,0x0010
SMTPPort=PT_LONG,0x0201
SMTPUseSSL=PT_LONG,0x0202
ServerTimeOut=PT_LONG,0x0209
LeaveOnServer=PT_LONG,0x1000

[IMAP_I_Mail]
AccountType=IMAP
;--- IMAP Account Settings ---
AccountName=PT_UNICODE,0x0002
DisplayName=PT_UNICODE,0x000B
EmailAddress=PT_UNICODE,0x000C
;--- IMAP Account Settings ---
IMAPServer=PT_UNICODE,0x0100
IMAPUserName=PT_UNICODE,0x0101
IMAPUseSPA=PT_LONG,0x0108
Organization=PT_UNICODE,0x0107
ReplyEmailAddress=PT_UNICODE,0x0103
IMAPPort=PT_LONG,0x0104
IMAPUseSSL=PT_LONG,0x0105
; --- SMTP Account Settings ---
SMTPServer=PT_UNICODE,0x0200
SMTPUseAuth=PT_LONG,0x0203
SMTPAuthMethod=PT_LONG,0x0208
SMTPUserName=PT_UNICODE,0x0204
SMTPUseSPA=PT_LONG,0x0207
ConnectionType=PT_LONG,0x000F
ConnectionOID=PT_UNICODE,0x0010
SMTPPort=PT_LONG,0x0201
SMTPUseSSL=PT_LONG,0x0202
ServerTimeOut=PT_LONG,0x0209
CheckNewImap=PT_LONG,0x1100
RootFolder=PT_UNICODE,0x1101

[INET_HTTP]
AccountType=HOTMAIL
Account=PT_UNICODE,0x0002
HttpServer=PT_UNICODE,0x0100
UserName=PT_UNICODE,0x0101
Organization=PT_UNICODE,0x0107
UseSPA=PT_LONG,0x0108
TimeOut=PT_LONG,0x0209
Reply=PT_UNICODE,0x0103
EmailAddress=PT_UNICODE,0x000C
FullName=PT_UNICODE,0x000B
Connection Type=PT_LONG,0x000F
ConnectOID=PT_UNICODE,0x0010