none
Modify the Host file without admin right with powershell or with the local system account RRS feed

  • Question

  • Hi ,

    I am able to modify the host file using power shell using administrative rights. But i want to achieve this  with out admin rights and can be execute with local system account .

    How to create the service using power shell so that i can use the log on name.

    Need suggestion .


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Monday, February 4, 2019 7:42 AM

Answers

  • The generic SYSTEM account has administrative rights as well. If you meant this particular account - yes you can do. If you're talking about normal user accounts - no. Unless you modify the rights of the file.

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    • Proposed as answer by jrv Monday, February 4, 2019 8:11 AM
    • Unproposed as answer by jrv Tuesday, February 5, 2019 7:18 AM
    • Proposed as answer by jrv Tuesday, February 5, 2019 7:18 AM
    • Marked as answer by Richard MuellerMVP, Moderator Tuesday, February 12, 2019 12:33 PM
    Monday, February 4, 2019 7:58 AM
  • The hosts file has been replaced by DNS.

    In general you should not be modifying the hosts file.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, February 5, 2019 3:08 PM
    Moderator

All replies

  • You cannot. You need administrative rights to change certain settings. And that's for a reason.

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Monday, February 4, 2019 7:44 AM
  • there is no option we can run a solution with local system account we have a limited access and we have to achieve  this.?

    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help. 


    Monday, February 4, 2019 7:51 AM
  • The generic SYSTEM account has administrative rights as well. If you meant this particular account - yes you can do. If you're talking about normal user accounts - no. Unless you modify the rights of the file.

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    • Proposed as answer by jrv Monday, February 4, 2019 8:11 AM
    • Unproposed as answer by jrv Tuesday, February 5, 2019 7:18 AM
    • Proposed as answer by jrv Tuesday, February 5, 2019 7:18 AM
    • Marked as answer by Richard MuellerMVP, Moderator Tuesday, February 12, 2019 12:33 PM
    Monday, February 4, 2019 7:58 AM
  • just want to confirm whether i can achieve this in any way

    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Tuesday, February 5, 2019 5:14 AM
  • The hosts file has been replaced by DNS.

    In general you should not be modifying the hosts file.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, February 5, 2019 3:08 PM
    Moderator