dism.exe commands in windows server 2008 R2

Am I missing something with the commands below?

1. dism.exe /image: <drive letter>: \ /cleanup-image /revertpendingactions

2. sfc /scannow /offbootir= <drive letter>:\/offwindir=<drive letter>:\windows

the first command gives the message--missing servicing command.
the second command does not run successfully either.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
On my Windows 8.1 machine, I did the following:

DISM.exe /Online /Cleanup-image /Scanhealth which took a while to run and said files could be fixed.
and then
DISM.exe /Online /Cleanup-image /Restorehealth which took another long while and fixed the files.

Then SFC ran without errors.

You might try the first command to scan and see if it produces results. I have not used the revert command you posted above.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MohlalefiAuthor Commented:
John, where did you run the commands from ? I cannot log on to my Windows server 2008 R2, and I am running these commands from the system recovery options cmd prompt, in an attempt get bad patches off my image.
JohnBusiness Consultant (Owner)Commented:
Hmmm, you did not mention you could not log on. I ran the commands from a command window in a running system.

The subcommands I posted are DISM commands like you are running. Try the restorehealth command to see if it run or if it produces the same error.
JohnBusiness Consultant (Owner)Commented:
@Mohlalefi  - Thank you and I was happy to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.