search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Server | No Comment | 5,153 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,634 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
	}
}

I did split FTP Username for domain environments.


Posted in Hosting & IIS7, Windows Powershell | No Comment | 8,681 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
}

AppPool is the name of the Application Pool.


Posted in Hosting & IIS7, Windows Powershell | No Comment | 5,364 views | 16/12/2010 22:29

Powershell function to remove IIS7 websites.

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,493 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"
}

LogDir is the path of Log directory.


Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,579 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
}

Status can be true (1) or false (0).


Posted in Hosting & IIS7, Windows Powershell | No Comment | 6,399 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
    }
}

StatusCode is the code name of error page, like 404.