Microsoft Virtualization Discussions

Powershell xx-NANDMPCOPY as scheduled task

JODY_IFVERSEN
2,458 Views

I have a need to relocate user home folders based a change in role.   I would like to do this using the powershell xx-NANDMPCOPY commandlets since it would be more efficient than redirecting the data through a host with something like Robocopy.  I have a script which will do this, and have successfully run it interactively.  However, when I try and run it as a scheduled task, the job fails with an 'Incorrect Function' error.

Has anyone successfully gotten the NANDMPCOPY commandlets to run as a scheduled task?  Is this even possible with the current version?

Thanks.

1 REPLY 1

vinith
2,458 Views

Hello Jody, Can you paste your code ?

Can you try the below code ?

$trigger = New-JobTrigger -Daily -At 3am

Register-ScheduledJob -Name Start-Copying -Trigger $trigger -ScriptBlock {

<#

#>

ipmo dataontap -ErrorAction SilentlyContinue

Invoke-NaNdmpCopy 10.61.167.61 /vol/vol4/t5/ 10.61.169.28 /vol/vol1/t5/ -SrcAuthType md5 -DstAuthType md5

}

Public