http://blogs.solidq.com/enriquepuignouselles/post.aspx?id=3&title=uploading+files+to+an+ftp+server+with+powershell
$Dir_file="C:\a.txt"
#ftp server
$ftp = "ftp://192.168.XXX.XXX/"
$user = "XXXXXXXXX"
$pass = "XXXXXXXXX"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
#list every sql server trace file
foreach($item in (dir $Dir "*.trc")){
"Uploading $item..."
$uri = New-Object System.Uri($ftp+$item.Name)
$webclient.UploadFile($uri, $item.FullName)
}