Posted in Exchange Server, Windows Powershell | No Comment | 40,172 views | 30/06/2011 23:58
You can get DAG configuration with this script.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| $DAGMemberServersArray = New-Object System.Collections.ArrayList
If ($Selected.Count -eq "0")
{
Write-Host "You didn't choose any DAG configuration."
Write-Host " "
Write-Host " "
Read-Host "Press enter to go back"
}
else
{
foreach ($DAGConfMember in $Selected)
{
$DAGInfo = (Get-DatabaseAvailabilityGroup $DAGConfMember)
$DAGName = $DAGInfo.Name
$DAGWitnessServer = $DAGInfo.WitnessServer.fqdn
$DAGWitnessDirectory = $DAGInfo.WitnessDirectory.PathName
$DAGIPAddress = $DAGInfo.DatabaseAvailabilityGroupIpv4Addresses
Write-Host "DAG Name: $DAGName" -ForegroundColor Green
Write-Host "DAG Witness Server: $DAGWitnessServer" -ForegroundColor Green
Write-Host "DAG Witness Directory: $DAGWitnessDirectory" -ForegroundColor Green
Write-Host "DAG IP: $DAGIpAddress" -ForegroundColor Green
$DAGMemberServers = (Get-DatabaseAvailabilityGroup $DAGConfMember).Servers
Foreach ($DAGMemberServer in $DAGMemberServers)
{
$DAGMemberServersArray.Add("$DAGMemberServer") | Out-Null
}
Write-Host "Server Members: $DAGMemberServersArray" -ForegroundColor Green
Write-Host " "
Write-Host " "
$DAGMemberServersArray.Clear();
}
Read-Host "Press enter to go back"
$Selected.Clear();
} |
$DAGMemberServersArray = New-Object System.Collections.ArrayList
If ($Selected.Count -eq "0")
{
Write-Host "You didn't choose any DAG configuration."
Write-Host " "
Write-Host " "
Read-Host "Press enter to go back"
}
else
{
foreach ($DAGConfMember in $Selected)
{
$DAGInfo = (Get-DatabaseAvailabilityGroup $DAGConfMember)
$DAGName = $DAGInfo.Name
$DAGWitnessServer = $DAGInfo.WitnessServer.fqdn
$DAGWitnessDirectory = $DAGInfo.WitnessDirectory.PathName
$DAGIPAddress = $DAGInfo.DatabaseAvailabilityGroupIpv4Addresses
Write-Host "DAG Name: $DAGName" -ForegroundColor Green
Write-Host "DAG Witness Server: $DAGWitnessServer" -ForegroundColor Green
Write-Host "DAG Witness Directory: $DAGWitnessDirectory" -ForegroundColor Green
Write-Host "DAG IP: $DAGIpAddress" -ForegroundColor Green
$DAGMemberServers = (Get-DatabaseAvailabilityGroup $DAGConfMember).Servers
Foreach ($DAGMemberServer in $DAGMemberServers)
{
$DAGMemberServersArray.Add("$DAGMemberServer") | Out-Null
}
Write-Host "Server Members: $DAGMemberServersArray" -ForegroundColor Green
Write-Host " "
Write-Host " "
$DAGMemberServersArray.Clear();
}
Read-Host "Press enter to go back"
$Selected.Clear();
}
$Selected is an array of Mailbox Servers.
Posted in Exchange Server, Windows Powershell | No Comment | 4,762 views | 30/06/2011 23:54
This script checks all available hub transport servers for DAG membership.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| $AvailableHTServer = @(Get-ExchangeServer | where {$_.ServerRole -like "*HubTransport*" -and $_.ServerRole -notlike "*Mailbox*"})
$AvailableHTServerCount = $AvailableHTServer.Count
$DAGName = Read-Host "Enter a name for your DAG"
Write-Host " "
if ($AvailableHTServerCount -gt "0")
{
$AvailableHTServerName = $AvailableHTServer[0].Name
Write-Host "Would you like to use $AvailableHTServerName as a witness server?"
Write-Host "1) Yes"
Write-Host "2) No"
Write-Host " "
[int]$HTQuestion = Read-Host "Enter number to select an option"
Write-Host " "
if ($HTQuestion -eq "1")
{
$WitnessServer = $AvailableHTServerName
}
else
{
$WitnessServer = Read-Host "Enter witness server name (like $AvailableHTServerName)"
}
}
else
{
Write-Warning "There are no suitable Hub Transport servers as a witness server."
Write-Warning "You should enter a witness server which has no Mailbox role on it."
Write-Warning "Make sure that the group Exchange Trusted Subsystem is added to the local administrators of the server that will be the witness server."
Write-Host " "
$WitnessServer = Read-Host "Enter witness server name"
} |
$AvailableHTServer = @(Get-ExchangeServer | where {$_.ServerRole -like "*HubTransport*" -and $_.ServerRole -notlike "*Mailbox*"})
$AvailableHTServerCount = $AvailableHTServer.Count
$DAGName = Read-Host "Enter a name for your DAG"
Write-Host " "
if ($AvailableHTServerCount -gt "0")
{
$AvailableHTServerName = $AvailableHTServer[0].Name
Write-Host "Would you like to use $AvailableHTServerName as a witness server?"
Write-Host "1) Yes"
Write-Host "2) No"
Write-Host " "
[int]$HTQuestion = Read-Host "Enter number to select an option"
Write-Host " "
if ($HTQuestion -eq "1")
{
$WitnessServer = $AvailableHTServerName
}
else
{
$WitnessServer = Read-Host "Enter witness server name (like $AvailableHTServerName)"
}
}
else
{
Write-Warning "There are no suitable Hub Transport servers as a witness server."
Write-Warning "You should enter a witness server which has no Mailbox role on it."
Write-Warning "Make sure that the group Exchange Trusted Subsystem is added to the local administrators of the server that will be the witness server."
Write-Host " "
$WitnessServer = Read-Host "Enter witness server name"
}
You can use $WitnessServer for provisioning.
Posted in Exchange Server, Windows Powershell | No Comment | 5,092 views | 30/06/2011 23:47
Hello,
You can use this script as a function to prepare Active Directory for HE 2010.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| $ErrorCode = $Null
Import-Module ServerManager
$ADStatus = (Get-WindowsFeature RSAT-ADDS).Installed
If ($ADStatus -ne $True)
{
Write-Warning "You should install Active Directory Administration Tools (RSAT-ADDS)"
Write-Host " "
Write-Warning "Aborting.."
Start-Sleep 3
$ErrorCode = "500"
}
If ($ErrorCode -eq $Null)
{
Write-Host " "
$OrganizationName = Read-Host "Organization Name"
Write-Host " "
$CurrentLocation = (Get-Location).Path
$SetupFile = $CurrentLocation + "\setup.com"
If (!(Test-Path -Path $SetupFile))
{
$SetupFilePath = Read-Host "Setup File Path"
$SetupFile = $SetupFilePath + "\setup.com"
If (!(Test-Path -Path $SetupFile))
{
Write-Warning "Could not find setup.com file."
Write-Host " "
Write-Warning "Aborting.."
Start-Sleep 3
$ErrorCode = "550"
}
}
}
If ($ErrorCode -eq $Null)
{
&"$SetupFile" /PrepareAD /OrganizationName:$OrganizationName /hosting
Write-Host " "
Write-Host "AD preparation completed successfully."
Start-Sleep 3
$PrepareADStatus = "Completed"
}
else
{
$PrepareADStatus = "Failed"
} |
$ErrorCode = $Null
Import-Module ServerManager
$ADStatus = (Get-WindowsFeature RSAT-ADDS).Installed
If ($ADStatus -ne $True)
{
Write-Warning "You should install Active Directory Administration Tools (RSAT-ADDS)"
Write-Host " "
Write-Warning "Aborting.."
Start-Sleep 3
$ErrorCode = "500"
}
If ($ErrorCode -eq $Null)
{
Write-Host " "
$OrganizationName = Read-Host "Organization Name"
Write-Host " "
$CurrentLocation = (Get-Location).Path
$SetupFile = $CurrentLocation + "\setup.com"
If (!(Test-Path -Path $SetupFile))
{
$SetupFilePath = Read-Host "Setup File Path"
$SetupFile = $SetupFilePath + "\setup.com"
If (!(Test-Path -Path $SetupFile))
{
Write-Warning "Could not find setup.com file."
Write-Host " "
Write-Warning "Aborting.."
Start-Sleep 3
$ErrorCode = "550"
}
}
}
If ($ErrorCode -eq $Null)
{
&"$SetupFile" /PrepareAD /OrganizationName:$OrganizationName /hosting
Write-Host " "
Write-Host "AD preparation completed successfully."
Start-Sleep 3
$PrepareADStatus = "Completed"
}
else
{
$PrepareADStatus = "Failed"
}
Setup.com stores in Exchange 2010 SP1 DVD.
Posted in Exchange Server, Windows Powershell | 7 Comments | 11,721 views | 30/06/2011 23:05
Hello,
I’m happy to pronounce my new Powershell tool. I’m sure that will help who wants to install Hosted Exchange.
Functionalities:
1) Prepare Active Directory: Prepares existing active directory to install Hosted Exchange 2010 SP1.
2) Install Exchange Roles: Helps you to install Exchange roles unattended.
3) Uninstall Exchange Roles: Helps you to uninstall Exchanges roles which you don’t need anymore.
4) Setup Exchange DAG: Sets up Exchange DAG, Witness Directory and IP/Subnet Configuration for Cluster.
5) Setup CAS Array: Creates Client Access Arrays, helps you to assign members
6) Setup Outlook Anywhere: Enables Outlook Anywhere and configures RPC service.
7) Setup Receive/Send Connector: Helps you to configure Hub Transport servers.
8) Setup SSL Certificate: Helps you to create CSR, Import/Export SSL Certificates and assign services
9) Virtual Directory Configuration: Checks the virtual directories and fix them if they are not default.
Download:
Donate: Thanks to support this open source project!
Usage:
1. First, you should allow signed Powershell scripts:
Set-ExecutionPolicy AllSigned |
Set-ExecutionPolicy AllSigned
2. Go to directory and execute start.ps1:
Sponsor: Applied Innovations
Posted in Linux Server | No Comment | 3,730 views | 21/06/2011 01:58
Linux sunucunuz üzerinde zaman dilimini değiştirmek istiyorsanız, aşağıdakileri uygulayın..
1
2
3
4
5
| ln -sf /usr/share/zoneinfo/$TimeZone /etc/localtime
rm -f /etc/sysconfig/clock
echo ZONE=`"$TimeZone`" >>/etc/sysconfig/clock
echo 'UTC=true' >>/etc/sysconfig/clock
echo 'ARC=false' >>/etc/sysconfig/clock |
ln -sf /usr/share/zoneinfo/$TimeZone /etc/localtime
rm -f /etc/sysconfig/clock
echo ZONE=`"$TimeZone`" >>/etc/sysconfig/clock
echo 'UTC=true' >>/etc/sysconfig/clock
echo 'ARC=false' >>/etc/sysconfig/clock
Zaman dilimi değerleri için aşağıdaki bağlantıya göz atınız:
$TimeZone değerini Europe/Istanbul gibi yerel zaman diliminiz şeklinde değiştirebilirsiniz.
Posted in Linux Server | No Comment | 4,567 views | 21/06/2011 01:49
CentOS Linux sunucu üzerinde NTP ayarlaması yapmak istiyorsanız, aşağıdakileri takip edin..
Öncelikle, eğer sunucu üzerinde yüklü değilse NTP paketini kurun.
Boot sonrası aktif hale gelebilmesini sağlayın.
Sistem saatini, yerel NTP sunucusu ile senkronize edin.
NTP’yi başlatın.
Sunucu saatini tekrar kontrol edin.
Posted in Hosting & IIS7 | No Comment | 5,920 views | 04/06/2011 11:35
Merhaba,
Aşağıda Parallels Plesk Panel 10 sürüm ve komponent bilgilerini bulabilirsiniz.
parallels_installer.exe --show-all-releases |
parallels_installer.exe --show-all-releases
panel PANEL_10_2_0_WIN (Parallels Plesk Panel 10.2.0)
panel PANEL_10_1_1_WIN (Parallels Plesk Panel 10.1.1)
panel PANEL_10_1_0_WIN (Parallels Plesk Panel 10.1.0)
panel PANEL_10_0_1_WIN (Parallels Plesk Panel 10.0.1)
panel PANEL_10_0_0_WIN (Parallels Plesk Panel 10.0.0)
ppsmbe PPSMBE_10_0_0_WIN (Parallels Small Business Panel 10.0)
ppsmbe PPSMBE_10_1_0_WIN (Parallels Small Business Panel 10.1.0)
ppsmbe PPSMBE_10_2_0_WIN (Parallels Small Business Panel 10.2.0)
Release id için “PANEL_10_2_0_WIN” kullanmalısınız.
parallels_installer.exe --select-release-id PANEL_10_2_0_WIN --show-components |
parallels_installer.exe --select-release-id PANEL_10_2_0_WIN --show-components
base – Parallels Panel core components
awstats – AWStats
mailenable – MailEnable mail server
dns – BIND DNS Server
perl – Perl script engine
python – Python script engine
php4 – PHP4 script engine
php5 – PHP5 script engine
spamassassin – SpamAssassin
mysql-client – MySQL server
phpmyadmin – PHPMyAdmin
mylittleadmin – myLittleAdmin
webalizer – Webalizer
mysql-odbc – MySQL ODBC driver
mssql – MSSQL 2005 server
mssql2008 – MSSQL 2008 server
fastcgi – FastCGI
webmail – Horde webmail
atmail – Atmail
drweb – Parallels Premium Anti-Virus
kav – Kaspersky anti-virus
mssql-webadmin – ASP.NET Enterprise Manager
plesk-migration-manager – Parallels Panel Migration Manager
stunnel – Parallels Panel SSL Wrapper
tomcat – Apache Tomcat Java server
health-monitoring – System Health Monitor
sitebuilder – SiteBuilder
billing – Parallels Customer & Business Manager
Ayrıca Parallels Small Business Panel’in komponentlerine bakalım:
parallels_installer.exe --select-release-id PPSMBE_10_0_0_WIN --show-components |
parallels_installer.exe --select-release-id PPSMBE_10_0_0_WIN --show-components
base – Parallels Panel core components
awstats – AWStats
mailenable – MailEnable mail server
dns – BIND DNS Server
siteeditor – Site Editor
ppsb_tp – Site Editor design templates
perl – Perl script engine
python – Python script engine
php4 – PHP4 script engine
php5 – PHP5 script engine
spamassassin – SpamAssassin
mysql – MySQL server
phpmyadmin – PHPMyAdmin
mylittleadmin – myLittleAdmin
mysql-odbc – MySQL ODBC driver
mssql – MSSQL server
fastcgi – FastCGI
webmail – Horde webmail
atmail – Atmail
drweb – Dr.Web anti-virus
mssql-webadmin – ASP.NET Enterprise Manager
“parallels_installer.exe” dosyasını Parallels’in web sayfasından indirebilirsiniz.
|