Permission Issues running sfc,chkdsk,dism as job in script??

Welcome Forums General PowerShell Q&A Permission Issues running sfc,chkdsk,dism as job in script??

Viewing 1 reply thread
  • Author
    • #254729
      Topics: 1
      Replies: 0
      Points: 7
      Rank: Member

      So I’m trying to create a script to run sfc,chkdsk, and dism as a job on the computer. It’s intended to be run on a computer that would be signed in as a standard user so that I can run this at the end of the day when I need to and check the reports after

      I think I’ve got the majority of the script in place already but running into issues when it gets to runing the actual utilities. It tells me that admin privelleges are needed please run in an elevated prompt.

      At the time of testing I was signed in as a local admin on the computer and simply testing out the commands in an admin session of PS so there should be no permission issues. If I remote the -credential parameter from the start-job cmd then the script runs (as I would expect, given that Im signed in as admin).

      Left the commands attached, open to any help/suggestions/opinions. End goal is to be able to run this by double clicking and forgetting about it until the next day, I don’t want to input passwords at all and would like for it to be run by a non-admin computer account.

      ######## *omitted $user and $pass lines
    • #255197
      Topics: 6
      Replies: 120
      Points: 127
      Helping Hand
      Rank: Participant

      Try running this and see what you get back from your test.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.