Posted in Windows Server | No Comment | 5,157 views | 28/12/2010 10:35
Varsayılan kurulumlarda, SCOM 2007 R2’yi SQL 2008 R2 üzerine kuramamaktasınız. Bu kurulumu gerçekleştirebilmek için, SQL 2008 R2’nin kurulu olduğu makina üzerine, SCOM 2007 R2 DVD’sini mount ettikten sonra;
DVD:\SupportTools\AMD64
klasörüne giriş yapın ve DBCreateWizard.exe dosyasını çalıştırın. Wizard sayesinde DB kurulumunu tamamlayıp, SCOM kurulumuna devam edebileceksiniz.
Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,643 views | 16/12/2010 22:35
Powershell function to remove IIS7 FTP.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| Function Remove-FTPSite
{
Param ($FTPUsername, $LogDir)
If ($FTPUsername -eq $null)
{
Write-Host FTP Username is null
}
Else
{
$FTPUsername = ($FTPUsername.Split("\")[1])
Remove-Item IIS:\Sites\".Default FTP Site"\$FTPUserDir\$FTPUsername -Recurse
}
} |
Function Remove-FTPSite
{
Param ($FTPUsername, $LogDir)
If ($FTPUsername -eq $null)
{
Write-Host FTP Username is null
}
Else
{
$FTPUsername = ($FTPUsername.Split("\")[1])
Remove-Item IIS:\Sites\".Default FTP Site"\$FTPUserDir\$FTPUsername -Recurse
}
}
I did split FTP Username for domain environments.
Posted in Hosting & IIS7, Windows Powershell | No Comment | 8,717 views | 16/12/2010 22:30
Powershell function to remove IIS7 Application Pools.
1
2
3
4
5
6
| Function Remove-AppPool
{
Param ($AppPool)
Remove-Item IIS:\AppPools\$AppPool -Recurse
} |
Function Remove-AppPool
{
Param ($AppPool)
Remove-Item IIS:\AppPools\$AppPool -Recurse
}
AppPool is the name of the Application Pool.
Posted in Hosting & IIS7, Windows Powershell | No Comment | 5,366 views | 16/12/2010 22:29
Powershell function to remove IIS7 websites.
Function Remove-WebSite
{
Param ($Description)
Remove-Item IIS:\Sites\$Description -Recurse
} |
Function Remove-WebSite
{
Param ($Description)
Remove-Item IIS:\Sites\$Description -Recurse
}
Description is the name of website in IIS7.
Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,494 views | 16/12/2010 22:26
Powershell function to set W3C logging to IIS7 websites.
1
2
3
4
5
6
| Function Set-W3CLogging
{
Param ($LogDir, $Description)
Set-ItemProperty IIS:\Sites\$Description -Name LogFile.Directory -Value "$LogDir"
} |
Function Set-W3CLogging
{
Param ($LogDir, $Description)
Set-ItemProperty IIS:\Sites\$Description -Name LogFile.Directory -Value "$LogDir"
}
LogDir is the path of Log directory.
Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,581 views | 16/12/2010 22:24
Powershell function to suspend a IIS7 website.
1
2
3
4
5
6
| Function Suspend-WebSite
{
Param ($Description, $Status, $Redirect)
Set-WebConfiguration -Filter /System.WebServer/HttpRedirect -value (@{Enabled="$Status"; Destination="$Redirect"}) -PSPath IIS:\ -Location $Description
} |
Function Suspend-WebSite
{
Param ($Description, $Status, $Redirect)
Set-WebConfiguration -Filter /System.WebServer/HttpRedirect -value (@{Enabled="$Status"; Destination="$Redirect"}) -PSPath IIS:\ -Location $Description
}
Status can be true (1) or false (0).
Posted in Hosting & IIS7, Windows Powershell | No Comment | 6,414 views | 16/12/2010 22:21
Powershell function to modify http errors in IIS7.
Function Modify-HttpErrors
{
Param ($Description, $StatusCode, $Path, $ResponseMode, $Action)
If ($Action -eq "Add")
{
Set-WebConfiguration -Filter /System.WebServer/HttpErrors/Error[@StatusCode=$StatusCode] -Value @{PrefixLanguageFilePath="$Null"; Path="$Path"; ResponseMode="$ResponseMode"} -PSPath IIS:\ -Location $Description
}
If ($Action -eq "Remove")
{
Set-WebConfiguration -Filter /System.WebServer/HttpErrors/Error[@StatusCode=$StatusCode] -Value @{PrefixLanguageFilePath="%SystemDrive%\inetpub\custerr"; Path="$StatusCode.html"; ResponseMode="File"} -PSPath IIS:\ -Location $Description
}
If ($Action -eq "Restore")
{
Clear-WebConfiguration -Filter /System.WebServer/HttpErrors/Error -PSPath IIS:\ -Location $Description
}
} |
Function Modify-HttpErrors
{
Param ($Description, $StatusCode, $Path, $ResponseMode, $Action)
If ($Action -eq "Add")
{
Set-WebConfiguration -Filter /System.WebServer/HttpErrors/Error[@StatusCode=$StatusCode] -Value @{PrefixLanguageFilePath="$Null"; Path="$Path"; ResponseMode="$ResponseMode"} -PSPath IIS:\ -Location $Description
}
If ($Action -eq "Remove")
{
Set-WebConfiguration -Filter /System.WebServer/HttpErrors/Error[@StatusCode=$StatusCode] -Value @{PrefixLanguageFilePath="%SystemDrive%\inetpub\custerr"; Path="$StatusCode.html"; ResponseMode="File"} -PSPath IIS:\ -Location $Description
}
If ($Action -eq "Restore")
{
Clear-WebConfiguration -Filter /System.WebServer/HttpErrors/Error -PSPath IIS:\ -Location $Description
}
}
StatusCode is the code name of error page, like 404.
|