News for hackers. Stuff that matters.
Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by voidmain0001 on Monday January 22, 2018 @01:18PM (#16206538)
I concur. For me personally, PowerShell's dependency on the .Net Framework just makes me write what I need in C# and then deploy to clients using GP. In my environment the client computers don't have a consistent .Net version which follows that they don't have a consistent PS version installed either. For a recent data collection program it was faster and easier to write it in C# and target .Net V2 then to fiddle with PS, and its execution policy https://stackoverflow.com/questions/4037939/powershell-says-...
Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by mistermann on Monday January 22, 2018 @01:54PM (#16206858)
What kind of C# are you writing, is it a compiled exe you're distributing or is there some way to run C# script on windows?

I've done almost nothing with PowerShell due to the brutal syntax, would love to use a nice language like C# or Python for the control structure (logic, looping, etc) and then just calling out to PowerShell when needing to execute a function. Seems like that should be a possibility, although passing data through may be problematic.

Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by rusanu on Monday January 22, 2018 @02:50PM (#16207307)
You don't need to 'shell' out to call PoSh. You can host it yourself, see https://msdn.microsoft.com/en-us/library/dn569260(v=vs.85).a... Passing data is quite easy, both ways, is just C# objects. This can be convenient when faced with one of those 'Powershell only API' features.
Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by voidmain0001 on Tuesday January 23, 2018 @08:48AM (#16213496)
It's a compiled binary (PE). I've read through numerous books on PowerShell and I don't see its value in comparison to using any other .Net language. All namespaces in PowerShell are available in C#/VB/blah so why deal with the annoyance of ensuring that the client has not only the required version of .Net Framework/Core installed, but also the PowerShell interpreter version too? Perhaps it's because PowerShell doesn't require a compiled binary so it can be modified and run without an extra step, and it allows for easy add-ins with the cmdlet interface.
Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by Someone1234 on Monday January 22, 2018 @02:07PM (#16206975)
csi.exe runs C# interactively as a script.
Re:Microsoft’s PowerShell Core Offers Cross-Platform Automation by andendau on Monday January 22, 2018 @03:32PM (#16207639)
You can run c# directly by using add-type in powershell