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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Removing IIS7 FTP with Powershell
Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,635 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.



Leave a Reply