New-CMVhd error Not Found - SCCM 2012 R2 CU3

When trying to execute New-CMVhd via powershell in SCCM 2012 R2 CU3 I get a "Not Found" error.

This happens in our production and pre-production environments.

Using the Console wizard works fine.

Command is:

New-CMVhd -Path "\\machine\D$\Windows2012R2Server_SCCM.vhd" -Name "Windows2012R2Server_SCCM" -Version "1.0" -VHDSize 100 -TaskSequencePackageId "XXX00123" -DistributionPointServerNames "server.contso.com" -Description "Built with Deploy Server To VHD Task Sequence." -Verbose

Output:

VERBOSE: Performing the operation "New" on target "Vhd: New".
VERBOSE: Executing WQL query: Select * From SMS_TaskSequencePackageReference_All where PackageID='XXX00123'
VERBOSE: Query options: None
VERBOSE: Executing WQL query: Select * From SMS_DistributionPointInfo where Name='server.contoso.com'
VERBOSE: Query options: None
VERBOSE: Query 'Select * From SMS_DistributionPointInfo where Name='server.contoso.com'' processed 1
results.
VERBOSE: Executing WQL query: SELECT Distinct tspr.RefPackageID FROM SMS_TaskSequencePackageReference_All AS tspr WHERE
 tspr.PackageID='XXX00123' and tspr.RefPackageID Not In (SELECT PackageID FROM SMS_Package AS p WHERE
p.PkgSourceFlag=1)
VERBOSE: Query options: None
New-CMVhd : Not found
At line:1 char:1
+ New-CMVhd -Path \\machine\D$\Windows2012R2Server_SCCM.vhd -Name "Windows201 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Confi...s.NewVhdCommand:NewVhdCommand) [New-CMVhd], WqlQueryExc
   eption
    + FullyQualifiedErrorId : UnhandledExeception,Microsoft.ConfigurationManagement.Cmdlets.Osd.Commands.NewVhdCommand

Can anyone else reproduce this? I have a feeling it will be a premier support call to Microsoft :-(

Thanks



December 10th, 2014 1:41am

Please file a feedback on Connect here: https://connect.microsoft.com/ConfigurationManagervnext

We'll look into getting this fixed in the next release of the cmdlets.

Free Windows Admin Tool Kit Click here and download it now
December 11th, 2014 9:28pm

Hi,

Pls try to run the following command to import CM powershell module and change the path to be the CM server before your new-cmvhd command:

import-module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
Set-Location CMserver:\

December 12th, 2014 9:07am

Or you can use the "Connect via Windows PowerShell" feature in CM remote console to run your command.

Meanwhile, try to change the command to be Version "X64".

Free Windows Admin Tool Kit Click here and download it now
December 12th, 2014 10:41am

Hi,

Just check if any updates for this issue.

December 16th, 2014 9:26am

I did install SCCM 2012 R2 CU4 and still have this issue. Any updates from Microsoft?

Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 2:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics