powershell to c# conversion help

can someone please help me convert the following powershell script file to c#?

some of it i understand; however, there are a few things that i don't understand.  i commented some stuff out (registry and active directory stuff - i know how to do this in c#).  the one function in the script is OctetToHours - this is where i need the help.

Thank you very much.
adLogonHours-PowerScript.txt
LVL 1
freezingHotAsked:
Who is Participating?
 
PeteEngineerCommented:
0
 
freezingHotAuthor Commented:
The first link is c# to power shell- I need it the other way.

The second link is calling a script from c#.

 

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.