Jump to content


daov

SCCM: Powershell CMDlets Failing

Recommended Posts

Howdy,

 

Long time reader. windows-noob.com is one of the best resources available for using SCCM by far.

Anyways, here's my issue and I'm a bit stumped.

I am attempting to automate our build and capture using Powershell.

Everything is working without issue so far except when I attempt to change the data source in SCCM for the image.

Example:

  1. I have a reference image from three months ago: Windows7x64ENTSP1_2014_11.wim
  2. Quarterly build and capture completes and new WIM file is created and housed in the same directory as previous WIM file but with different year/month on filename: Windows7x64ENTSP1_2015_02.wim
  3. I run:
  • set-cmoperatingsystemimage -id <ID number> -path <network path to new WIM>

Result:

Set-CMOperatingSystemImage 
: ConfigMgr Error Object:
instance 
of SMS_ExtendedStatus
{
Description 
= "Failed to read image property from the source WIM file due to error 
80070032";
ErrorCode 
= 2147942450;
File 
= 
"e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspimagepackage.cpp";
Line 
= 355;
ObjectInfo 
= "CSspImagePackage::PreUpdatePackageHook";
Operation 
= "PutInstance";
ParameterInfo 
= "";
ProviderName 
= "ExtnProv";
StatusCode 
= 2147749889;
};
At 
line:1 char:1
+ 
Set-CMOperatingSystemImage -Id 40200497 -Version 2015_02 -Path "\\<path> 
...
+ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
CategoryInfo : NotSpecified: 
(Microsoft.Confi...temImageCommand:SetOperatingSystemImageCommand) 
[Set-CMOperatingSystemImage], WqlQueryExcepti 
on
+ 
FullyQualifiedErrorId : 
UnhandledExeception,Microsoft.ConfigurationManagement.Cmdlets.Osd.Commands.SetOperatingSystemImageCommand 

I had thought it an access/permissions issue so I set the permissions to EVERYONE to test.

This did not correct it.

Tried adding SYSTEM as well to no avail.

I CAN complete this process by point and click in the console without issue so my guess is that when running the command in Powershell, it is trying to use another account to complete the action or is it expecting some local resource to be available?

As a further test, I updated to the latest ADK but alas, this did not correct it either.

It is obviously referencing a CPP file that is in turn expecting a resource or something but I cannot find anything regarding this error.

Though the error code 80070032 appears in numerous postings elsewhere, they tend to not be in relation to the Powershell command.

Any help out there would be fantastic!

Share this post


Link to post
Share on other sites

As it turns out, I answered my own question. There appears to be some prerequisites on the WIM file in question if invoking the Powershell cmdlets. This particular image, a leftover for testing these commands only, was not valid for these cmdlets. I built a new image from scratch and tried using the command on it and voila, it worked!

 

Feel free to close this or mark as answered I suppose.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.