1
Vote

Directory creation for remote Windows 2003 server doesn't work

description

If you use -Server and specify a remote Windows 2003 server, we hit this logic:
    if ($Windows2003)
    {
        $testpath = Test-Path $filepath
        if (!$testpath)
        {
            write-host ""
            write-host $filepath " Does not exist. Creating it.."
            New-Item -ItemType directory -Path $filepath -force   
But that $filepath uses local path syntax, so it creates the folder on the local server.

comments