Q:

Need to create a robocopy in Powershell 1.0

My ultimate goal is to mirror a folder and its subdirectories with the restriction of only copying files with the extensions, sln, vcxproj, cs, cpp, hpp, c, and h.  There are far too many subfolders to manage this manually.  I tried using the robocopy command in powershell, however it is not possible in Powershell 1.0.   How can I achieve my objective in Powershell?
Improvised Solution
I managed to borrow some code and made some slight tweaks to it.  It isn't robocopy per se, but it is managing to get close to what I am after.  Note: this is just the code I copied, not the code I modified.
$Source = '\\ServerA\Folder\Root\'
$Destination = '\\ServerB\Folder\Root'

$SrcEntries = Get-ChildItem $Source -Recurse
foreach($Src in $SrcEntries)
{
 $SrcPath = $Src.fullname
 $DesPath = $SrcPath.Replace($Source, $Destination)

 #Check is source exist in dest
 if(test-Path $DesPath)
 {
  #if source was change 
  If(Compare-Object $SrcPath $DesPath) 
  {
   #then replace
   Copy-Item $SrcPath $DesPath -Force
  }
 }
 else
 {         
  #if dont exist then copy too
  Copy-Item $SrcPath $DesPath
 }
}

$DesEntries = Get-ChildItem $Destination -Recurse
foreach($Des in $DesEntries)
{
 $DesPath = $Des.fullname
 $SrcPath = $DesPath.Replace($Destination, $Source)

 if((test-Path $SrcPath) -eq $false)
 {
  #if source dont exist then delete dest
  Remove-Item $DesPath
 }
}

A:

Robocopy is not a PowerShell command.  It's a Windows command-line utility, and it's not included with XP. 
You need to get the Windows Server 2003 Resource Kit Tools  to get Robocopy for XP.  Once you have it, you'll be able to utilize it in PowerShell.

