Setting your OWA Virtual Directory Options

In the process of working on the OWA Policy part of my lab setup script I veered off my path and ended up creating a script that would allow for modifying the various attributes on the OWA virtual directory of Exchange Server 2013. As of now the only changes I make are to the attribute that allow for a true / false or a 1 /2 /3 option to them. No string options or multi-variable ones are completed at this point. Also, authentication changes were a hair more complicated to make due to dependencies on the ECP directory. I will have a supplemental change for that one later this week as I already have half the code written for that function.

The script for these changes turned into more of a copy and past job as it is made up of 90% code ‘chunks’. These chunks allowed for a large script to be created relatively quickly and efficiently. I will cover how I created those chunks and explain the other running parts that go with it.


Creation Process
The intent of the script is to provide a menu driven interface to allow for the configuration of all of the options on the OWA Virtual Director The menu is quite large as the OWA vDir has over 70 options to configure. This script only covers the basics, which gives us 67 options.

The Menu

[string] $menu = @'
	
    ***********************************************************
            OWA Virtual Directory Configuration Menu
    ***********************************************************

    (1)  ActionForUnknownFileAndMIMETypes                     (31) OWALightEnabled                                       (61) WeatherEnabled
    (2)  ActiveSyncIntegrationEnabled                         (32) PhoneticSupportEnabled                                (62) WebPartsFrameOptionsType
    (3)  AllAddressListsEnabled                               (33) PlacesEnabled                                         (63) WebReadyDocumentViewingForAllSupportedTypes
    (4)  AllowCopyContactsToDeviceAddressBook                 (34) PredictedActionsEnabled                               (64) WebReadyDocumentViewingOnPrivateComputersEnable
    (5)  AllowedFileTypes                                     (35) PremiumClientEnabled                                  (65) WebReadyDocumentViewingOnPublicComputersEnabled
    (6)  AllowOfflineOn                                       (36) PublicFoldersEnabled                                  (66) WSSAccessOnPrivateComputersEnabled
    (7)  CalendarEnabled                                      (37) RecoverDeletedItemsEnabled                            (67) WSSAccessOnPublicComputersEnabled
    (8)  ChangePasswordEnabled                                (38) RemindersAndNotificationsEnabled                      
    (9)  ContactsEnabled                                      (39) ReportJunkEmailEnabled                                
    (10) DelegateAccessEnabled                                (40) RulesEnabled                                          
    (11) DirectFileAccessOnPrivateComputersEnabled            (41) SearchFoldersEnabled                                  
    (12) DirectFileAccessOnPublicComputersEnabled             (42) SetPhotoEnabled / SetPhotoURL                         
    (13) DisableFacebook                                      (43) SignaturesEnabled                                     
    (14) FacebookEnabled                                      (44) SilverlightEnabled                                    
    (15) ForceSaveAttachmentFilteringEnabled                  (45) SkipCreateUnifiedGroupCustomSharepointClassification  
    (16) ForceWacViewingFirstOnPrivateComputers               (46) SMimeEnabled                                          
    (17) ForceWacViewingFirstOnPublicComputers                (47) SpellCheckerEnabled                                   
    (18) ForceWebReadyDocumentViewingFirstOnPrivateComputers  (48) TasksEnabled                                          
    (19) ForceWebReadyDocumentViewingFirstOnPublicComputers   (49) TextMessagingEnabled                                  
    (20) write-host GlobalAddressListEnabled                  (50) ThemeSelectionEnabled                                 
    (21) GroupCreationEnabled                                 (51) UMIntegrationEnabled                                  
    (22) InstantMessagingEnabled                              (52) UNCAccessOnPrivateComputersEnabled                    
    (23) InstantMessagingType                                 (53) UNCAccessOnPublicComputersEnabled                     
    (24) IRMEnabled                                           (54) UseGB18030                                            
    (25) JournalEnabled                                       (55) UseISO885915                                          
    (26) JunkEmailEnabled                                     (56) UserDiagnosticEnabled                                 
    (27) LinkedInEnabled                                      (57) WacExternalServicesEnabled                            
    (28) NotesEnabled                                         (58) WacOMEXEnabled                                        
    (29) OrganizationEnabled                                  (59) WacViewingOnPrivateComputersEnabled                   
    (30) OutboundCharset                                      (60) WacViewingOnPublicComputersEnabled                    

    (98) Reboot the Server
    (99) Exit

Select an option.. [1-99]?
'@

Each of the options is a repeatable chunk of code that was created using Excel. Yes, Excel. I’ve found that if I need to make a repeatable one liner or chunk of PowerShell code, Excel is my go to tool. So what does the chunk look like?

function ActionForUnknownFileAndMIMETypes {
    write-host " "
    # Action For Unknown File And MIME Types
    write-host "Action For Unknown File And MIME Types - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ActionForUnknownFileAndMIMETypes}
    write-host " "
    write-host  "Change Action For Unknown File And MIME Types Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Action For Unknown File And MIME Types to  (a) Allow, (f) ForceSave, (b) Block"
        if ($answer -eq "a") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes allow }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes force }
        if ($answer -eq "b") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes block }
        write-host " "
        write-host "Action For Unknown File And MIME Types - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.ActionForUnknownFileAndMIMETypes}
    }
}

The repeatable chunks are identified in the below diagram:

OWABlock1

The items circled are the changes that are made to each chunk. Otherwise the rest of the chunk remains the same (as long as the choices are purely True / False). To do this I created an Excel spreadsheet to make this easier to create. One note is that I did not start out with this entire chunk at once and tested the code in variations and built the function portion of the code once complete.

Excel Spreadsheet

OWABlock2

Each line in the spread sheet is combined cell by cell to create a line of code. The red and blue circled sections show the ‘source’ for those cells. This way to create a new function, I just need the parameter name (no space) and the parameter name (with spaces). With this process, 67 options because an exercise in copy and paste. However, I ended up with a 1300 line script because of it.

The Script
Be forewarned, I am including the entire script contents below and it is around 1300 lines.

<#  
.SYNOPSIS
   	This script will modify all settings on the OWA Virtual Directory for Exchange 2013

.DESCRIPTION  
    

.NOTES  
    Version      		: 1.0
    Wish list			: Add multi value variables to the script
    Rights Required		: Local admin on server
    Sched Task Req'd		: No
    Exchange Version		: 2013
    Author       		: Just A UC Guy [JAUCG]
    Email/Blog/Twitter	        : ( ) 	https://justaucguy.wordpress.com/
    Dedicated Blog		: https://justaucguy.wordpress.com/
    Disclaimer   		: You are on your own.  This was not written by, support by, or endorsed by Microsoft.
    Info Stolen from 		: None, all hand written code.

.LINK  
[TBD]

.EXAMPLE
	.\Changes-OWAvDirSettings

.INPUTS
	None. You cannot pipe objects to this script.
#>

param(
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)] 
	[string] $strFilenameTranscript = $MyInvocation.MyCommand.Name + " " + (hostname)+ " {0:yyyy-MM-dd hh-mmtt}.log" -f (Get-Date),
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$true, Mandatory=$false)] 
	[string] $TargetFolder = "c:\Install",
	# [string] $TargetFolder = $Env:Temp
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)] 
	[bool] $WasInstalled = $false,
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)] 
	[bool] $RebootRequired = $false,
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)] 
	[string] $opt = "None",
	[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)] 
	[bool] $HasInternetAccess = ([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet)
)

Start-Transcript -path .\$strFilenameTranscript | Out-Null
$error.clear()

# Get virtual directory  information
write-host "Processing initial data set...." -foregroundcolor Cyan
$value = get-owavirtualdirectory

Clear-Host
Pushd

[string] $menu = @'
	
    ***********************************************************
            OWA Virtual Directory Configuration Menu
    ***********************************************************

    (1)  ActionForUnknownFileAndMIMETypes                     (31) OWALightEnabled                                       (61) WeatherEnabled
    (2)  ActiveSyncIntegrationEnabled                         (32) PhoneticSupportEnabled                                (62) WebPartsFrameOptionsType
    (3)  AllAddressListsEnabled                               (33) PlacesEnabled                                         (63) WebReadyDocumentViewingForAllSupportedTypes
    (4)  AllowCopyContactsToDeviceAddressBook                 (34) PredictedActionsEnabled                               (64) WebReadyDocumentViewingOnPrivateComputersEnable
    (5)  AllowedFileTypes                                     (35) PremiumClientEnabled                                  (65) WebReadyDocumentViewingOnPublicComputersEnabled
    (6)  AllowOfflineOn                                       (36) PublicFoldersEnabled                                  (66) WSSAccessOnPrivateComputersEnabled
    (7)  CalendarEnabled                                      (37) RecoverDeletedItemsEnabled                            (67) WSSAccessOnPublicComputersEnabled
    (8)  ChangePasswordEnabled                                (38) RemindersAndNotificationsEnabled                      
    (9)  ContactsEnabled                                      (39) ReportJunkEmailEnabled                                
    (10) DelegateAccessEnabled                                (40) RulesEnabled                                          
    (11) DirectFileAccessOnPrivateComputersEnabled            (41) SearchFoldersEnabled                                  
    (12) DirectFileAccessOnPublicComputersEnabled             (42) SetPhotoEnabled / SetPhotoURL                         
    (13) DisableFacebook                                      (43) SignaturesEnabled                                     
    (14) FacebookEnabled                                      (44) SilverlightEnabled                                    
    (15) ForceSaveAttachmentFilteringEnabled                  (45) SkipCreateUnifiedGroupCustomSharepointClassification  
    (16) ForceWacViewingFirstOnPrivateComputers               (46) SMimeEnabled                                          
    (17) ForceWacViewingFirstOnPublicComputers                (47) SpellCheckerEnabled                                   
    (18) ForceWebReadyDocumentViewingFirstOnPrivateComputers  (48) TasksEnabled                                          
    (19) ForceWebReadyDocumentViewingFirstOnPublicComputers   (49) TextMessagingEnabled                                  
    (20) write-host GlobalAddressListEnabled                  (50) ThemeSelectionEnabled                                 
    (21) GroupCreationEnabled                                 (51) UMIntegrationEnabled                                  
    (22) InstantMessagingEnabled                              (52) UNCAccessOnPrivateComputersEnabled                    
    (23) InstantMessagingType                                 (53) UNCAccessOnPublicComputersEnabled                     
    (24) IRMEnabled                                           (54) UseGB18030                                            
    (25) JournalEnabled                                       (55) UseISO885915                                          
    (26) JunkEmailEnabled                                     (56) UserDiagnosticEnabled                                 
    (27) LinkedInEnabled                                      (57) WacExternalServicesEnabled                            
    (28) NotesEnabled                                         (58) WacOMEXEnabled                                        
    (29) OrganizationEnabled                                  (59) WacViewingOnPrivateComputersEnabled                   
    (30) OutboundCharset                                      (60) WacViewingOnPublicComputersEnabled                    

    (98) Reboot the Server
    (99) Exit

Select an option.. [1-99]?
'@

function ActionForUnknownFileAndMIMETypes {
    write-host " "
    # Action For Unknown File And MIME Types
    write-host "Action For Unknown File And MIME Types - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ActionForUnknownFileAndMIMETypes}
    write-host " "
    write-host  "Change Action For Unknown File And MIME Types Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Action For Unknown File And MIME Types to  (a) Allow, (f) ForceSave, (b) Block"
        if ($answer -eq "a") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes allow }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes force }
        if ($answer -eq "b") {get-owavirtualdirectory | set-owavirtualdirectory -ActionForUnknownFileAndMIMETypes block }
        write-host " "
        write-host "Action For Unknown File And MIME Types - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.ActionForUnknownFileAndMIMETypes}
    }
}

function activesyncintegrationenabled {
    write-host " "    
    # Active Sync Integration
    write-host "Active Sync Integration - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.activesyncintegrationenabled}
    write-host " "
    write-host  "Change Active Sync Integrtion Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set OWA Active Sync Integration to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -activesyncintegrationenabled $true
        } else {get-owavirtualdirectory | set-owavirtualdirectory -activesyncintegrationenabled $false}
        write-host " "
        write-host "Active Sync Integration - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.activesyncintegration}
    }
}

function AllAddressListsEnabled {
    write-host " "
    # All Address Lists Enabled
    write-host "All Address Lists Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.AllAddressListsEnabled}
    write-host " "
    write-host  "Change All Address Lists Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set OWA All Address Lists Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -AllAddressListsEnabled $true
           } else {get-owavirtualdirectory | set-owavirtualdirectory -AllAddressListsEnabled $false}
           write-host " "
        write-host "All Address Lists Enabled - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.AllAddressListsEnabled}
    }
}

function AllowCopyContactsToDeviceAddressBook {
    write-host " "
    # Allow Copy Contacts To Device Address Book
    write-host "Allow Copy Contacts To Device Address Book - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.AllowCopyContactsToDeviceAddressBook}
    write-host " "
    write-host  "Change Allow Copy Contacts To Device Address Book Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set AllowCopyContactsToDeviceAddressBook to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -AllowCopyContactsToDeviceAddressBook $true
           } else {get-owavirtualdirectory | set-owavirtualdirectory -AllowCopyContactsToDeviceAddressBook $false}
        write-host " "
        write-host "Allow Copy Contacts To Device Address Book - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.AllowCopyContactsToDeviceAddressBook}
    }
}

#
# Code these later:
#      AllowedFileTypes,AllowedMimeTypes,BlockedFileTypes,BlockedMimeTypes
#

function CalendarEnabled {
    write-host " "
    # Calendar Enabled
    write-host "Allow Copy Contacts To Device Address Book - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.AllowCopyContactsToDeviceAddressBook}
    write-host " "
    write-host  "Change the Calendar Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Calendar Enabled to (t) True or (f)"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -calendarenabled $true
           } else {get-owavirtualdirectory | set-owavirtualdirectory -calendarenabled $false}
        write-host " "
        write-host "Allow Copy Contacts To Device Address Book - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.calendarenabled}
    }
}

function AllowOfflineOn {
    write-host " "
    # AllowOfflineOn
    write-host "Allow Offline On - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.AllowOfflineOn}
    write-host " "
    write-host  "Change Allow Offline On Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Allow Offline On to (p) PrivateComputersOnly, (n) NoComputers or (a) AllComputers"
        if ($answer -eq "p") {get-owavirtualdirectory | set-owavirtualdirectory -AllowOffline OnPrivateComputersOnly }
        if ($answer -eq "n") {get-owavirtualdirectory | set-owavirtualdirectory -AllowOffline OnNoComputers }
        if ($answer -eq "a") {get-owavirtualdirectory | set-owavirtualdirectory -AllowOffline OnAllComputers }
        write-host " "
        write-host "Allow Offline On - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.AllowOfflineOn}
    }
}

function AllAddressListsEnabled {
    write-host " "
    # All AddressLists Enabled
    write-host "All Address Lists - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.AllAddressListsEnabled}
    write-host " "
    write-host  "Change All Address Lists Enabled Value? " -nonewline -ForegroundColor yello; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set OWA All Address Lists Enabled to (t) True or (f)"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -AllAddressListsEnabled $true
           } else {get-owavirtualdirectory | set-owavirtualdirectory -AllAddressListsEnabled $false}
        write-host " "
        write-host "All Address Lists - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.AllAddressListsEnabled}
    }
}

function ChangePasswordEnabled {
    write-host " "
    # Change Password Enabled
    write-host "Change Password Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ChangePasswordEnabled}
    write-host " "
    write-host  "Change Change Password Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Change Password Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ChangePasswordEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ChangePasswordEnabled $false }
        write-host " "
        write-host "Change Password Enabled - After:" -foregroundcolor cyan
        $value = get-owavirtualdirectory;foreach ($line in $value) {$line.servername+","+$line.ChangePasswordEnabled}
    }
}



function ContactsEnabled {
    write-host " "
    # Contacts Enabled
    write-host "Contacts Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ContactsEnabled}
    write-host " "
    write-host  "Change Contacts Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Contacts Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ContactsEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ContactsEnabled $false }
        write-host " "
        write-host "Contacts Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ContactsEnabled}
    }
}

function DelegateAccessEnabled {
    write-host " "
    # Delegate Access Enabled
    write-host "Delegate Access Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.DelegateAccessEnabled}
    write-host " "
    write-host  "Change Delegate Access Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Delegate Access Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -DelegateAccessEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -DelegateAccessEnabled $false }
        write-host " "
        write-host "Delegate Access Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.DelegateAccessEnabled}
    }
}

function DirectFileAccessOnPrivateComputersEnabled {
    write-host " "
    # Direct File Access On Private Computers Enabled
    write-host "Direct File Access On Private Computers Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.DirectFileAccessOnPrivateComputersEnabled}
    write-host " "
    write-host  "Change Direct File Access On Private Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Direct File Access On Private Computers Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -DirectFileAccessOnPrivateComputersEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -DirectFileAccessOnPrivateComputersEnabled $false }
        write-host " "
        write-host "Direct File Access On Private Computers Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.DirectFileAccessOnPrivateComputersEnabled}
    }
}

function DirectFileAccessOnPublicComputersEnabled {
    write-host " "
    # Direct File Access On Public Computers Enabled
    write-host "Direct File Access On Public Computers Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.DirectFileAccessOnPublicComputersEnabled}
    write-host " "
    write-host  "Change Direct File Access On Public Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set DirectFileAccessOnPublicComputersEnabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -DirectFileAccessOnPublicComputersEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -DirectFileAccessOnPublicComputersEnabled $false }
        write-host " "
        write-host "Direct File Access On Public Computers Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.DirectFileAccessOnPublicComputersEnabled}
    }
}

function FacebookAccess {
    write-host " "
    # Facebook Access
    write-host  "Change Facebook Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Facebook to (e) Enabled or (d) Disabled"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -FacebookEnabled}
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -DisableFacebook}
    }
}

function DisplayPhotosEnabled {
write-host " "
    # Display Photos Enabled
    write-host "Display Photos Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.DisplayPhotosEnabled}
    write-host " "
    write-host  "Change Display Photos Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Display Photos Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -DisplayPhotosEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -DisplayPhotosEnabled $false }
        write-host " "
        write-host "Display Photos Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.DisplayPhotosEnabled}
    }
}

function ForceSaveAttachmentFilteringEnabled {
    write-host " "
    # Force Save Attachment Filtering Enabled
    write-host "Force Save Attachment Filtering Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ForceSaveAttachmentFilteringEnabled}
    write-host " "
    write-host  "Change Force Save Attachment Filtering Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Force Save Attachment Filtering Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ForceSaveAttachmentFilteringEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ForceSaveAttachmentFilteringEnabled $false }
        write-host " "
        write-host "Force Save Attachment Filtering Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ForceSaveAttachmentFilteringEnabled}
    }
}

function ForceWacViewingFirstOnPrivateComputers {
    write-host " "
    # Force Wac Viewing First On Private Computers
    write-host "Force Wac Viewing First On Private Computers - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ForceWacViewingFirstOnPrivateComputers}
    write-host " "
    write-host  "Change Force Wac Viewing First On Private Computers Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Force Wac Viewing First On Private Computers to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWacViewingFirstOnPrivateComputers $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWacViewingFirstOnPrivateComputers $false }
        write-host " "
        write-host "Force Wac Viewing First On Private Computers - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ForceWacViewingFirstOnPrivateComputers}
    }
}

function ForceWacViewingFirstOnPublicComputers {
    write-host " "
    # Force Wac Viewing First On Public Computers
    write-host "Force Wac Viewing First On Public Computers - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ForceWacViewingFirstOnPublicComputers}
    write-host " "
    write-host  "Change Force Wac Viewing First On Public Computers Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Force Wac Viewing First On Public Computers to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWacViewingFirstOnPublicComputers $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWacViewingFirstOnPublicComputers $false }
        write-host " "
        write-host "Force Wac Viewing First On Public Computers - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ForceWacViewingFirstOnPublicComputers}
    }
}

function ForceWebReadyDocumentViewingFirstOnPrivateComputers {
    write-host " "
    # Force Web Ready Document Viewing First On Private Computers
    write-host "Force Web Ready Document Viewing First On Private Computers - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ForceWebReadyDocumentViewingFirstOnPrivateComputers}
    write-host " "
    write-host  "Change Force Web Ready Document Viewing First On Private Computers Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Force Web Ready Document Viewing First On Private Computers to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWebReadyDocumentViewingFirstOnPrivateComputers $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWebReadyDocumentViewingFirstOnPrivateComputers $false }
        write-host " "
        write-host "Force Web Ready Document Viewing First On Private Computers - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ForceWebReadyDocumentViewingFirstOnPrivateComputers}
    }
}

write-host " "

function ForceWebReadyDocumentViewingFirstOnPublicComputers {
    # Force Web Ready Document Viewing First On Public Computers
    write-host "Force Web Ready Document Viewing First On Public Computers - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.ForceWebReadyDocumentViewingFirstOnPublicComputers}
    write-host " "
    write-host  "Change Force Web Ready Document Viewing First On Public Computers Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Force Web Ready Document Viewing First On Public Computers to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWebReadyDocumentViewingFirstOnPublicComputers $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ForceWebReadyDocumentViewingFirstOnPublicComputers $false }
        write-host " "
        write-host "Force Web Ready Document Viewing First On Public Computers - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.ForceWebReadyDocumentViewingFirstOnPublicComputers}
    }
}

function GlobalAddressListEnabled {
    write-host " "
    # Global Address List Enabled
    write-host "Global Address List Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.GlobalAddressListEnabled}
    write-host " "
    write-host  "Change Global Address List Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Global Address List Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -GlobalAddressListEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -GlobalAddressListEnabled $false }
        write-host " "
        write-host "Global Address List Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.GlobalAddressListEnabled}
    }
}

function GroupCreationEnabled {
    write-host " "
    # Group Creation Enabled
    write-host "Group Creation Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.GroupCreationEnabled}
    write-host " "
    write-host  "Change Group Creation Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Group Creation Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -GroupCreationEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -GroupCreationEnabled $false }
        write-host " "
        write-host "Group Creation Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.GroupCreationEnabled}
    }
}

function InstantMessagingEnabled {
    write-host " "
    # Instant Messaging Enabled
    write-host "Instant Messaging Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.InstantMessagingEnabled}
    write-host " "
    write-host  "Change Instant Messaging Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Instant Messaging Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -InstantMessagingEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -InstantMessagingEnabled $false }
        write-host " "
        write-host "Instant Messaging Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.InstantMessagingEnabled}
    }
}

function InstantMessagingType {
    write-host " "
    # Instant Messaging Type
    write-host "Instant Messaging Type - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.InstantMessagingType}
    write-host " "
    write-host  "Change Instant Messaging Type Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set Instant Messaging Type to  (n) None, (o) OCS, (m) MSN"
        if ($answer -eq "n") {get-owavirtualdirectory | set-owavirtualdirectory -InstantMessagingType None }
        if ($answer -eq "o") {get-owavirtualdirectory | set-owavirtualdirectory -InstantMessagingType OCS }
        if ($answer -eq "m") {get-owavirtualdirectory | set-owavirtualdirectory -InstantMessagingType MSN }
        write-host " "
        write-host "Instant Messaging Type - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.InstantMessagingType}
    }
}

function IRMEnabled {
    write-host " "
    # IRM Enabled
    write-host "IRM Enabled - Before:" -foregroundcolor green
    foreach ($line in $value) {$line.servername+","+$line.IRMEnabled}
    write-host " "
    write-host  "Change IRM Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
    if ($set -eq "y") {
        $answer = read-host "Set IRM Enabled to (t) True or (f) False"
        if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -IRMEnabled $true }
        if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -IRMEnabled $false }
        write-host " "
        write-host "IRM Enabled - After:" -foregroundcolor cyan
        foreach ($line in $value) {$line.servername+","+$line.IRMEnabled}
    }
}

function JournalEnabled {
     write-host " "
     write-host "Journal Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.JournalEnabled}
     write-host " "
     write-host  "Change Journal Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Journal Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -JournalEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -JournalEnabled $false }
         write-host " "
         write-host "Journal Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.JournalEnabled}
     }
} # End of JournalEnabled

function JunkEmailEnabled {
     write-host " "
     write-host "Junk Email Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.JunkEmailEnabled}
     write-host " "
     write-host  "Change Junk Email Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Junk Email Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -JunkEmailEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -JunkEmailEnabled $false }
         write-host " "
         write-host "Junk Email Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.JunkEmailEnabled}
     }
} # End of JunkEmailEnabled

function LinkedInEnabled {
     write-host " "
     write-host "LinkedIn Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.LinkedInEnabled}
     write-host " "
     write-host  "Change LinkedIn Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set LinkedIn Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -LinkedInEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -LinkedInEnabled $false }
         write-host " "
         write-host "LinkedIn Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.LinkedInEnabled}
     }
} # End of LinkedInEnabled

function NotesEnabled {
     write-host " "
     write-host "Notes Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.NotesEnabled}
     write-host " "
     write-host  "Change Notes Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Notes Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -NotesEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -NotesEnabled $false }
         write-host " "
         write-host "Notes Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.NotesEnabled}
     }
} # End of NotesEnabled

function OrganizationEnabled {
     write-host " "
     write-host "Organization Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.OrganizationEnabled}
     write-host " "
     write-host  "Change Organization Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Organization Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -OrganizationEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -OrganizationEnabled $false }
         write-host " "
         write-host "Organization Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.OrganizationEnabled}
     }
} # End of OrganizationEnabled

function OutboundCharset {
     write-host " "
     # Outbound Charset
     write-host "Outbound Charset - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.OutboundCharset}
     write-host " "
     write-host  "Change Outbound Charset Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Outbound Charset to (8) AlwaysUTF8, (a) AutoDetect or (u) UserLanguageChoice"
         if ($answer -eq "8") {get-owavirtualdirectory | set-owavirtualdirectory -OutboundCharset AlwaysUTF8 }
         if ($answer -eq "a") {get-owavirtualdirectory | set-owavirtualdirectory -OutboundCharset AutoDetect }
         if ($answer -eq "u") {get-owavirtualdirectory | set-owavirtualdirectory -OutboundCharset UserLAnguageChoice }
         write-host " "
         write-host "Outbound Charset - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.OutboundCharset}
     }
} # End of Outbound Charset

function OWALightEnabled {
     write-host " "
     write-host "OWA Light Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.OWALightEnabled}
     write-host " "
     write-host  "Change OWA Light Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set OWA Light Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -OWALightEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -OWALightEnabled $false }
         write-host " "
         write-host "OWA Light Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.OWALightEnabled}
     }
} # End of OWALightEnabled

function PhoneticSupportEnabled {
     write-host " "
     write-host "Phonetic Support Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.PhoneticSupportEnabled}
     write-host " "
     write-host  "Change Phonetic Support Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Phonetic Support Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -PhoneticSupportEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -PhoneticSupportEnabled $false }
         write-host " "
         write-host "Phonetic Support Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.PhoneticSupportEnabled}
     }
} # End of PhoneticSupportEnabled

function PlacesEnabled {
     write-host " "
     write-host "Places Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.PlacesEnabled}
     write-host " "
     write-host  "Change Places Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Places Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -PlacesEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -PlacesEnabled $false }
         write-host " "
         write-host "Places Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.PlacesEnabled}
     }
} # End of PlacesEnabled

function PredictedActionsEnabled {
     write-host " "
     write-host "Predicted Actions Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.PredictedActionsEnabled}
     write-host " "
     write-host  "Change Predicted Actions Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Predicted Actions Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -PredictedActionsEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -PredictedActionsEnabled $false }
         write-host " "
         write-host "Predicted Actions Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.PredictedActionsEnabled}
     }
} # End of PredictedActionsEnabled

function PremiumClientEnabled {
     write-host " "
     write-host "Premium Client Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.PremiumClientEnabled}
     write-host " "
     write-host  "Change Premium Client Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Premium Client Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -PremiumClientEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -PremiumClientEnabled $false }
         write-host " "
         write-host "Premium Client Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.PremiumClientEnabled}
     }
} # End of PremiumClientEnabled

function PublicFoldersEnabled {
     write-host " "
     write-host "Public Folders Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.PublicFoldersEnabled}
     write-host " "
     write-host  "Change Public Folders Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Public Folders Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -PublicFoldersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -PublicFoldersEnabled $false }
         write-host " "
         write-host "Public Folders Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.PublicFoldersEnabled}
     }
} # End of PublicFoldersEnabled

function RecoverDeletedItemsEnabled {
     write-host " "
     write-host "Recover Deleted Items Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.RecoverDeletedItemsEnabled}
     write-host " "
     write-host  "Change Recover Deleted Items Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Recover Deleted Items Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -RecoverDeletedItemsEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -RecoverDeletedItemsEnabled $false }
         write-host " "
         write-host "Recover Deleted Items Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.RecoverDeletedItemsEnabled}
     }
} # End of RecoverDeletedItemsEnabled

function RemindersAndNotificationsEnabled {
     write-host " "
     write-host "Reminders And Notifications Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.RemindersAndNotificationsEnabled}
     write-host " "
     write-host  "Change Reminders And Notifications Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Reminders And Notifications Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -RemindersAndNotificationsEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -RemindersAndNotificationsEnabled $false }
         write-host " "
         write-host "Reminders And Notifications Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.RemindersAndNotificationsEnabled}
     }
} # End of RemindersAndNotificationsEnabled

function ReportJunkEmailEnabled {
     write-host " "
     write-host "Report Junk Email Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.ReportJunkEmailEnabled}
     write-host " "
     write-host  "Change Report Junk Email Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Report Junk Email Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ReportJunkEmailEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ReportJunkEmailEnabled $false }
         write-host " "
         write-host "Report Junk Email Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.ReportJunkEmailEnabled}
     }
} # End of ReportJunkEmailEnabled

function RulesEnabled {
     write-host " "
     write-host "Rules Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.RulesEnabled}
     write-host " "
     write-host  "Change Rules Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Rules Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -RulesEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -RulesEnabled $false }
         write-host " "
         write-host "Rules Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.RulesEnabled}
     }
} # End of RulesEnabled

function SearchFoldersEnabled {
     write-host " "
     write-host "Search Folders Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SearchFoldersEnabled}
     write-host " "
     write-host  "Change Search Folders Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Search Folders Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SearchFoldersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SearchFoldersEnabled $false }
         write-host " "
         write-host "Search Folders Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SearchFoldersEnabled}
     }
} # End of SearchFoldersEnabled

function SetPhotoEnabled {
     write-host " "
     write-host "Set Photo Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SetPhotoEnabled}
     write-host " "
     write-host  "Change Set Photo Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Set Photo Enabled to (t) True or (f) False"
         if ($answer -eq "t") {$SetPhotoURL = read-host "Specify the location of the user photos (URL)" ; get-owavirtualdirectory | set-owavirtualdirectory -SetPhotoEnabled $true -SetPhotoURL $SetPhotoURL}
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SetPhotoEnabled $false }
         write-host " "
         write-host "Set Photo Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SetPhotoEnabled}
     }
} # End of SetPhotoEnabled

function SignaturesEnabled {
     write-host " "
     write-host "Signatures Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SignaturesEnabled}
     write-host " "
     write-host  "Change Signatures Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Signatures Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SignaturesEnabled $true}
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SignaturesEnabled $false }
         write-host " "
         write-host "Signatures Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SignaturesEnabled}
     }
} # End of SignaturesEnabled

function SilverlightEnabled {
     write-host " "
     write-host "Silverlight Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SilverlightEnabled}
     write-host " "
     write-host  "Change Silverlight Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Silverlight Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SilverlightEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SilverlightEnabled $false }
         write-host " "
         write-host "Silverlight Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SilverlightEnabled}
     }
} # End of SilverlightEnabled

function SkipCreateUnifiedGroupCustomSharepointClassification {
     write-host " "
     write-host "Skip Create Unified Group Custom Sharepoint Classification - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SkipCreateUnifiedGroupCustomSharepointClassification}
     write-host " "
     write-host  "Change Skip Create Unified Group Custom Sharepoint Classification Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Skip Create Unified Group Custom Sharepoint Classification to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SkipCreateUnifiedGroupCustomSharepointClassification $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SkipCreateUnifiedGroupCustomSharepointClassification $false }
         write-host " "
         write-host "Skip Create Unified Group Custom Sharepoint Classification - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SkipCreateUnifiedGroupCustomSharepointClassification}
     }
} # End of SkipCreateUnifiedGroupCustomSharepointClassification

function SMimeEnabled {
     write-host " "
     write-host "Smime Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SMimeEnabled}
     write-host " "
     write-host  "Change Smime Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Smime Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SMimeEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SMimeEnabled $false }
         write-host " "
         write-host "Smime Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SMimeEnabled}
     }
} # End of SMimeEnabled

function SpellCheckerEnabled {
     write-host " "
     write-host "Spell Checker Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.SpellCheckerEnabled}
     write-host " "
     write-host  "Change Spell Checker Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Spell Checker Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -SpellCheckerEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -SpellCheckerEnabled $false }
         write-host " "
         write-host "Spell Checker Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.SpellCheckerEnabled}
     }
} # End of SpellCheckerEnabled

function TasksEnabled {
     write-host " "
     write-host "Tasks Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.TasksEnabled}
     write-host " "
     write-host  "Change Tasks Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Tasks Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -TasksEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -TasksEnabled $false }
         write-host " "
         write-host "Tasks Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.TasksEnabled}
     }
} # End of TasksEnabled

function TextMessagingEnabled {
     write-host " "
     write-host "Text Messaging Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.TextMessagingEnabled}
     write-host " "
     write-host  "Change Text Messaging Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Text Messaging Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -TextMessagingEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -TextMessagingEnabled $false }
         write-host " "
         write-host "Text Messaging Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.TextMessagingEnabled}
     }
} # End of TextMessagingEnabled

function ThemeSelectionEnabled {
     write-host " "
     write-host "Theme Selection Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.ThemeSelectionEnabled}
     write-host " "
     write-host  "Change Theme Selection Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Theme Selection Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -ThemeSelectionEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -ThemeSelectionEnabled $false }
         write-host " "
         write-host "Theme Selection Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.ThemeSelectionEnabled}
     }
} # End of ThemeSelectionEnabled

function UMIntegrationEnabled {
     write-host " "
     write-host "UM Integration Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UMIntegrationEnabled}
     write-host " "
     write-host  "Change UM Integration Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set UM Integration Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UMIntegrationEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UMIntegrationEnabled $false }
         write-host " "
         write-host "UM Integration Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UMIntegrationEnabled}
     }
} # End of UMIntegrationEnabled

function UNCAccessOnPrivateComputersEnabled {
     write-host " "
     write-host "UNC Access On Private Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UNCAccessOnPrivateComputersEnabled}
     write-host " "
     write-host  "Change UNC Access On Private Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set UNC Access On Private Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UNCAccessOnPrivateComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UNCAccessOnPrivateComputersEnabled $false }
         write-host " "
         write-host "UNC Access On Private Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UNCAccessOnPrivateComputersEnabled}
     }
} # End of UNCAccessOnPrivateComputersEnabled

function UNCAccessOnPublicComputersEnabled {
     write-host " "
     write-host "UNC Access On Public Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UNCAccessOnPublicComputersEnabled}
     write-host " "
     write-host  "Change UNC Access On Public Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set UNC Access On Public Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UNCAccessOnPublicComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UNCAccessOnPublicComputersEnabled $false }
         write-host " "
         write-host "UNC Access On Public Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UNCAccessOnPublicComputersEnabled}
     }
} # End of UNCAccessOnPublicComputersEnabled

function UseGB18030 {
     write-host " "
     write-host "Use GB18030 - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UseGB18030}
     write-host " "
     write-host  "Change Use GB18030 Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Use GB18030 to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UseGB18030 $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UseGB18030 $false }
         write-host " "
         write-host "Use GB18030 - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UseGB18030}
     }
} # End of UseGB18030

function UseISO885915 {
     write-host " "
     write-host "Use ISO 885915 - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UseISO885915}
     write-host " "
     write-host  "Change Use ISO 885915 Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Use ISO 885915 to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UseISO885915 $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UseISO885915 $false }
         write-host " "
         write-host "Use ISO 885915 - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UseISO885915}
     }
} # End of UseISO885915

function UserDiagnosticEnabled {
     write-host " "
     write-host "User Diagnostic Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.UserDiagnosticEnabled}
     write-host " "
     write-host  "Change User Diagnostic Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set User Diagnostic Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -UserDiagnosticEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -UserDiagnosticEnabled $false }
         write-host " "
         write-host "User Diagnostic Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.UserDiagnosticEnabled}
     }
} # End of UserDiagnosticEnabled

function WacExternalServicesEnabled {
     write-host " "
     write-host "Wac External Services Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WacExternalServicesEnabled}
     write-host " "
     write-host  "Change Wac External Services Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Wac External Services Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WacExternalServicesEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WacExternalServicesEnabled $false }
         write-host " "
         write-host "Wac External Services Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WacExternalServicesEnabled}
     }
} # End of WacExternalServicesEnabled

function WacOMEXEnabled {
     write-host " "
     write-host "Wac OMEX Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WacOMEXEnabled}
     write-host " "
     write-host  "Change Wac OMEX Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Wac OMEX Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WacOMEXEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WacOMEXEnabled $false }
         write-host " "
         write-host "Wac OMEX Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WacOMEXEnabled}
     }
} # End of WacOMEXEnabled

function WacViewingOnPrivateComputersEnabled {
     write-host " "
     write-host "Wac Viewing On Private Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WacViewingOnPrivateComputersEnabled}
     write-host " "
     write-host  "Change Wac Viewing On Private Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Wac Viewing On Private Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WacViewingOnPrivateComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WacViewingOnPrivateComputersEnabled $false }
         write-host " "
         write-host "Wac Viewing On Private Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WacViewingOnPrivateComputersEnabled}
     }
} # End of WacViewingOnPrivateComputersEnabled

function WacViewingOnPublicComputersEnabled {
     write-host " "
     write-host "Wac Viewing On Public Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WacViewingOnPublicComputersEnabled}
     write-host " "
     write-host  "Change Wac Viewing On Public Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Wac Viewing On Public Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WacViewingOnPublicComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WacViewingOnPublicComputersEnabled $false }
         write-host " "
         write-host "Wac Viewing On Public Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WacViewingOnPublicComputersEnabled}
     }
} # End of WacViewingOnPublicComputersEnabled

function WeatherEnabled {
     write-host " "
     write-host "Weather Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WeatherEnabled}
     write-host " "
     write-host  "Change Weather Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Weather Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WeatherEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WeatherEnabled $false }
         write-host " "
         write-host "Weather Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WeatherEnabled}
     }
} # End of WeatherEnabled

function WebPartsFrameOptionsType {
     write-host " "
     # Web Parts Frame Options Type
     write-host "Web Parts Frame Options Type - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WebPartsFrameOptionsType}
     write-host " "
     write-host  "Change Web Parts Frame Options Type Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Web Parts Frame Options Type to  (d) Deny, (a) AllowFrom, (n) None or (s) SameOrigin"
         if ($answer -eq "d") {get-owavirtualdirectory | set-owavirtualdirectory -WebPartsFrameOptionsType Deny }
         if ($answer -eq "a") {get-owavirtualdirectory | set-owavirtualdirectory -WebPartsFrameOptionsType Allow From }
         if ($answer -eq "n") {get-owavirtualdirectory | set-owavirtualdirectory -WebPartsFrameOptionsType None }
         if ($answer -eq "s") {get-owavirtualdirectory | set-owavirtualdirectory -WebPartsFrameOptionsType Same Origin }
         write-host " "
         write-host "Web Parts Frame Options Type - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WebPartsFrameOptionsType}
     }
} # End of Web Parts Frame Options Type

function WebReadyDocumentViewingForAllSupportedTypes {
     write-host " "
     write-host "Web Ready Document Viewing For All Supported Types - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingForAllSupportedTypes}
     write-host " "
     write-host  "Change Web Ready Document Viewing For All Supported Types Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Web Ready Document Viewing For All Supported Types to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingForAllSupportedTypes $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingForAllSupportedTypes $false }
         write-host " "
         write-host "Web Ready Document Viewing For All Supported Types - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingForAllSupportedTypes}
     }
} # End of WebReadyDocumentViewingForAllSupportedTypes

function WebReadyDocumentViewingOnPrivateComputersEnabled {
     write-host " "
     write-host "Web Ready Document Viewing On Private Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingOnPrivateComputersEnabled}
     write-host " "
     write-host  "Change Web Ready Document Viewing On Private Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Web Ready Document Viewing On Private Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingOnPrivateComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingOnPrivateComputersEnabled $false }
         write-host " "
         write-host "Web Ready Document Viewing On Private Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingOnPrivateComputersEnabled}
     }
} # End of WebReadyDocumentViewingOnPrivateComputersEnabled

function WebReadyDocumentViewingOnPublicComputersEnabled {
     write-host " "
     write-host "Web Ready Document Viewing On Public Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingOnPublicComputersEnabled}
     write-host " "
     write-host  "Change Web Ready Document Viewing On Public Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set Web Ready Document Viewing On Public Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingOnPublicComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WebReadyDocumentViewingOnPublicComputersEnabled $false }
         write-host " "
         write-host "Web Ready Document Viewing On Public Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WebReadyDocumentViewingOnPublicComputersEnabled}
     }
} # End of WebReadyDocumentViewingOnPublicComputersEnabled

function WSSAccessOnPrivateComputersEnabled {
     write-host " "
     write-host "WSS Access On Private Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WSSAccessOnPrivateComputersEnabled}
     write-host " "
     write-host  "Change WSS Access On Private Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set WSS Access On Private Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WSSAccessOnPrivateComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WSSAccessOnPrivateComputersEnabled $false }
         write-host " "
         write-host "WSS Access On Private Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WSSAccessOnPrivateComputersEnabled}
     }
} # End of WSSAccessOnPrivateComputersEnabled

function WSSAccessOnPublicComputersEnabled {
     write-host " "
     write-host "WSSAccess On Public Computers Enabled - Before:" -foregroundcolor green
     foreach ($line in $value) {$line.servername+","+$line.WSSAccessOnPublicComputersEnabled}
     write-host " "
     write-host  "Change WSSAccess On Public Computers Enabled Value? " -nonewline -ForegroundColor yellow; $set = read-host
     if ($set -eq "y") {
         $answer = read-host "Set WSSAccess On Public Computers Enabled to (t) True or (f) False"
         if ($answer -eq "t") {get-owavirtualdirectory | set-owavirtualdirectory -WSSAccessOnPublicComputersEnabled $true }
         if ($answer -eq "f") {get-owavirtualdirectory | set-owavirtualdirectory -WSSAccessOnPublicComputersEnabled $false }
         write-host " "
         write-host "WSSAccess On Public Computers Enabled - After:" -foregroundcolor cyan
         foreach ($line in $value) {$line.servername+","+$line.WSSAccessOnPublicComputersEnabled}
     }
} # End of WSSAccessOnPublicComputersEnabled

Do {
	if ($opt -ne "None") {Write-Host "Last command: "$opt -foregroundcolor Yellow}	
	$opt = Read-Host $menu

	switch ($opt)    {
        1 { ActionForUnknownFileAndMIMETypes }
        2 { ActiveSyncIntegrationEnabled }
        3 { AllAddressListsEnabled }
        4 { AllowCopyContactsToDeviceAddressBook }
        5 { AllowedFileTypes  }
        6 { AllowOfflineOn }
        7 { CalendarEnabled }
        8 { ChangePasswordEnabled }
        9 { ContactsEnabled }
        10 { DelegateAccessEnabled }
        11 { DirectFileAccessOnPrivateComputersEnabled }
        12 { DirectFileAccessOnPublicComputersEnabled }
        13 { DisableFacebook }
        14 { FacebookEnabled }
        15 { ForceSaveAttachmentFilteringEnabled }
        16 { ForceWacViewingFirstOnPrivateComputers }
        17 { ForceWacViewingFirstOnPublicComputers }
        18 { ForceWebReadyDocumentViewingFirstOnPrivateComputers }
        19 { ForceWebReadyDocumentViewingFirstOnPublicComputers }
        20 { GlobalAddressListEnabled }
        21 { GroupCreationEnabled }
        22 { InstantMessagingEnabled }
        23 { InstantMessagingType }
        24 { IRMEnabled }
        25 { JournalEnabled }
        26 { JunkEmailEnabled }
        27 { LinkedInEnabled }
        28 { NotesEnabled }
        29 { OrganizationEnabled }
        30 { OutboundCharset }
        31 { OWALightEnabled }
        32 { PhoneticSupportEnabled }
        33 { PlacesEnabled }
        34 { PredictedActionsEnabled }
        35 { PremiumClientEnabled }
        36 { PublicFoldersEnabled }
        37 { RecoverDeletedItemsEnabled }
        38 { RemindersAndNotificationsEnabled }
        39 { ReportJunkEmailEnabled }
        40 { RulesEnabled }
        41 { SearchFoldersEnabled }
        42 { SetPhotoEnabled }
        43 { SignaturesEnabled }
        44 { SilverlightEnabled }
        45 { SkipCreateUnifiedGroupCustomSharepointClassification }
        46 { SMimeEnabled }
        47 { SpellCheckerEnabled }
        48 { TasksEnabled }
        49 { TextMessagingEnabled }
        50 { ThemeSelectionEnabled }
        51 { UMIntegrationEnabled }
        52 { UNCAccessOnPrivateComputersEnabled }
        53 { UNCAccessOnPublicComputersEnabled }
        54 { UseGB18030 }
        55 { UseISO885915 }
        56 { UserDiagnosticEnabled }
        57 { WacExternalServicesEnabled }
        58 { WacOMEXEnabled }
        59 { WacViewingOnPrivateComputersEnabled }
        60 { WacViewingOnPublicComputersEnabled }
        61 { WeatherEnabled }
        62 { WebPartsFrameOptionsType }
        63 { WebReadyDocumentViewingForAllSupportedTypes }
        64 { WebReadyDocumentViewingOnPrivateComputersEnabled }
        65 { WebReadyDocumentViewingOnPublicComputersEnabled }
        66 { WSSAccessOnPrivateComputersEnabled }
        67 { WSSAccessOnPublicComputersEnabled }
        
	98 {#	Exit and restart
		Stop-Transcript
		restart-computer -computername localhost -force
	}
	99 {#	Exit
		popd
		Write-Host "Exiting..."
		Stop-Transcript
	}
	default {Write-Host "You haven't selected any of the available options. "}

	}
} while ($opt -ne 99)

The Script in Action

Manin Menu
Note I have to run the screen at 180 width in order to see the menu.

OWAvDir1

Sample run through 1

OWAvDir2

Sample run though 2

OWAvDir3

Download
Here is the script to download.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s