SCVMM 2012 installed to manage a cluster of Windows 2012 Hyper-V servers - All in the same domain. I am trying to import a VHDX. I use:
Import-SCLibraryPhysicalResource-SourcePath$FilePath -OverwriteExistingFiles-SharePath$LibraryPath
The command works fine interactively and also in inside a .ps1 that is executed interactively. If I take the same script and execute it remotely via an SSH connection (Cygwin) connected to via a domain administrator account (I enabled CredSSP) fails with:
Start-BitsTransfer : The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist. (Exception from HRESULT: 0x800704DD)
At C:\Program Files\ECS\Scripts\ECS051-ImportOSTemplate.ps1:106 char:13
+ Import-SCLibraryPhysicalResource -SourcePath $FilePath -OverwriteEx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-BitsTransfer], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBitsTransferCommand
The only thing I found is that a lot of similar thread (Related to Windows Update) indicated BITS should run under the Local System Account, but in SCVMM it is configured to run under Network Service.
What do I need to configure SCVMM such that the command works non-interactive?