Tente isso, deve fazer o que seu arquivo bat antigo fez. Salve como yourName.ps1 e ative a execução dos scripts do PowerShell, iniciando PowerShell como admin e executando "Set-ExecutionPolicy RemoteSigned".
<#
.SYNOPSIS
Push a folder to stack with "pushd" then call this script with files/filepattern as arguments
.EXAMPLE
script.ps1 *.pu,*.txt
Copies pu files and txt files to last folder pushed to stack.
#>
Param(
[Parameter(Mandatory=$False, Position=0)]
[String[]]$files,
[alias("h")]
[switch]$help
)
if($help -or !$files)
{
(Get-Help $MyInvocation.MyCommand.Definition -full)
exit(0);
}
$CopyToFolder = $null;
try
{
$CopyToFolder = (get-location -stack).peek();
}
catch
{
write-host "Stack is empty, use pushd before $($MyInvocation.MyCommand)";
exit(1);
}
foreach($f in $files)
{
(copy $f $CopyToFolder);
write-host ".\$files copied to $CopyToFolder\$files";
}