Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On unix you would have had to write that script anyways unledd maybe jq can help (?). I usually use convertto-csv and it works like a charm. Powershell is more like python than bash.

If you learn .net stuff it might make it more easy to use. You can access .net functions from powershell, so had you written that code in c# instead if node, you could reuse it in powershell anytime you want.

Although, personally I use shells to test stuff or for basic things, python kicks butt regardless of platform.

I hope your work let's you use wsl. If not, try running powershell.exe -version 1, that let's you bypass constrained language mode if that is the issue. Also, lookup set-executionpolicy and unblock-file, in case those are what you needed for the not allowed part. You can even bring your own powershell entirely! Powershell itself is an interface around System.Management.Automation windows/.net assembly. There are tools used in red-teaming where you just bring your own powershell interface and bypass any restriction. Even if you can't bring new exe's, no problem, you can relectively load assembly's and run them in memory, with or without powershell. Your org must be setup Crazy good if you have windows and there is no way to do whatever you want in powershell without admin rights. But don't get in trouble because of my advice!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: