takeown command in SCCM Tasksequence Run command line

Boopathi S 3,806 Reputation points
2023-03-07T16:31:38.6233333+00:00

Hello,

I am trying to use the below command in "Run CommandLine" in the SCCM Task Sequence. Same command works in the command prompt.

takeown.exe /F C:\Windows.old /R /D Y >>C:\PROGRA~1\Logs\WindowsOldTakeOwnership.log

take

smsts.log says that Error: Invalid syntax. The value 'Y' cannot be used for the '/D' option.

Please help how do I use the takeown command in task sequence as Run command line

I also tried cmd /c takeown.exe /F C:\Windows.old /R /D Y >>C:\PROGRA~1\Logs\WindowsOldTakeOwnership.log

But it returned the same error

Microsoft Security Intune Configuration Manager Other
0 comments No comments
{count} votes

Accepted answer
  1. CherryZhang-MSFT 6,496 Reputation points
    2023-03-08T07:53:03.4633333+00:00

    Hi @Boopathi Subramaniam

    Please remove >>C:\PROGRA~1\Logs\WindowsOldTakeOwnership.log from the command.

    The screenshots for your reference:

    1

    2

    Thanks for your time.

    Best regards,
    Cherry


     

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.