Great vid! Short and sweet, and to the point. Thanks a lot!
@barnes09248 ай бұрын
Thanks so much for the tutorial! I was stuck for a while with no output on the console, but after looking at your code I realized I forgot the "!" in the last if statement which caused my console to output nothing.
@stevea170811 ай бұрын
Nice short and sweet. Can this easily be converted to work in a winform?
@bluehippotech11 ай бұрын
Absolutely it can
@MrSurfsAlot2 жыл бұрын
this is very useful thank you very much
@spiffylich33492 жыл бұрын
doesnt seem to work. always get: "system management automation namespace not found"
@bluehippotech2 жыл бұрын
You need to install the package from nuget :D
@jlumley2 жыл бұрын
@@bluehippotech only System.Management.Instrumentation is appearing
@jlumley2 жыл бұрын
@@bluehippotech Microsoft.PowerShell.5.1.ReferenceAssemblies is the one
@bluehippotech2 жыл бұрын
Where?
@gallacticvr41572 жыл бұрын
@@jlumley Sick Lad
@Saberune1 Жыл бұрын
Hey man. This works great :) However, I was wondering if you know how I can have it display the full errors (or where to check them). I'm getting "An error has occured which PowerShell cannot handle..." for one of my scripts that I'm running from my app but I am having a hard time troubleshooting it with the generic error. Any help would be much appreciated thank you!
@bluehippotech Жыл бұрын
Instead of subscribing to the output stream you can subscribe to the error stream :D
@Saberune1 Жыл бұрын
Thank you so much for the quick reply! I don’t quite understand what you mean by subscribing to the error stream instead of the output stream. I thought the ps.Streams.Error.DataAdded line was already subscribing to the error stream. Sorry for the trouble and thank you again for the help!
@bluehippotech Жыл бұрын
Oh yeah you're absolutely right. Have you tried running the powershell script with powershell 7 to see if you get a proper error there? I've had issues a few times because of powershell 7, but it might just be that your script is made for powershell 5?
@nyshone2 жыл бұрын
In case I want to use my program on another computer, does it need to have powershell 7 installed for it to work? Does it need the DLL files to be present in a new environment, or can it be standalone? Thank you for the answer in advance.
@nifex1235 ай бұрын
Thank you sir
@bluehippotech5 ай бұрын
Thanks for watching!
@jamesmartin-kk6uk2 жыл бұрын
Hey mate! Great video! not sure if you're still looking at this! I was wondering if you knew how to set the execution policy for the powershell instance? I tried: _ps.AddCommand("Set-ExecutionPolicy").AddParameter("ExecutionPolicy", "Unrestricted").AddParameter("scope","LocalMachine").Invoke(); But am receiving "AuthorizationManager check failed." as an error still :( I'm also running the C# program as an Administrator @Blue Hippo
@minimalstory2 жыл бұрын
thanks for help)
@on4ayl2 жыл бұрын
Would have been a great video if not for tiny illegible text.
@bluehippotech2 жыл бұрын
Just watched it on my phone, you're right, it's way too small if you're not on a PC. My bad :/ Thanks for the feedback, it helps me get better!