none
C# RRS feed

  • Question

  • I can make some software using c# for change Windows operating system configuration?(ex-password/polices)
    Wednesday, June 19, 2019 5:43 PM

All replies

  • A lot of policies can be managed via WMI. But public available scripts are more PowerShell than C#. If you are open to run scripts then its just a matter of Process.Start with the script file name. 


    Visual C++ MVP

    Wednesday, June 19, 2019 7:51 PM
  • Hi pubudui, 

    Thank you for posting here.

    Based on your description, calling PowerShell scripts from C# is a solution to change Windows OS configurations.

    Here’s the reference you can refer to:

    PowerShell: Changing Computer State

    C#: Executing PowerShell scripts from C#

    Hope it can help you.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, June 21, 2019 2:29 AM