Тёмный

Run PowerShell in .NET 

Adam Driscoll
Подписаться 4,4 тыс.
Просмотров 9 тыс.
50% 1

In this video, I show how to create a .NET 6 console application that takes advantage of the PowerShell SDK to run scripts and commands. We also touch on error handling and inputs\outputs.
The example code this video can be found here: github.com/ada...

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@user-lk2tw2cj7g
@user-lk2tw2cj7g 7 месяцев назад
Hey, there. Thanks for the run down here, it was super useful. I do have one question though. How are you able to use Console.WriteLine and ReadLine without using System;? I am still having to use it for similar code. I am using Visual Studio 2019 and not VSCode, though I'm not sure if it's relevant.
@krzysztoff8813
@krzysztoff8813 2 года назад
How do I lanuch my app with the administrator (elevated) rights? I am trying to 'Get-VM", but prompt just closes.
@ozb8337
@ozb8337 4 месяца назад
Did you ever figure this out @krzysztoff8813? I have the same issue now
@SilentNorn
@SilentNorn 5 месяцев назад
typed dotnet add package Microsoft.PowerShell.SDK in Terminal. error: for the paket "Microsoft.PowerShell.SDK" are no versions available. I installed the PowerShell SDK beforehand and even restarted my pc. what am I doing wrong?
@SilentNorn
@SilentNorn 5 месяцев назад
Apparently neither DotNetSDK 6 nor 8 support PowerShell anymore. I am going to stay with python, where it still works...
@anderson.martines
@anderson.martines 10 месяцев назад
\o/, aparently the automation could be removed that version 7.4, but stays still 7.2
@anderson.martines
@anderson.martines 10 месяцев назад
the bamespace Automation doesnt found in my project, even installing the
@AyanMullick
@AyanMullick 2 года назад
How can one run `Write-Output 'Hello world'` on the browser? Adding the PowerShell SDK fails on REPL.it
@AdamDriscoll
@AdamDriscoll 2 года назад
Not quite sure why Write-Host isn't working but I was able to add the SDK in my REPL.it. imgur.com/a/2ILU2em
@AyanMullick
@AyanMullick 2 года назад
Yes, adding the SDK worked. However, 'Write-Host' fails, even on the shell. Thank you for the screenshot. How should one run it Blazor WASM? I couldn't load 'Microsoft.PowerShell.ConsoleHost'. i.imgur.com/mMEHq8k.png
Далее
Styling your PowerShell terminal with $PSStyle
9:43
Просмотров 2,3 тыс.
Advanced PowerShell - Runspaces
17:04
Просмотров 9 тыс.
Brutally honest advice for new .NET Web Developers
7:19
What do programmers actually do?
9:20
Просмотров 2 млн
You Should Learn PowerShell
13:18
Просмотров 27 тыс.
The Logging Everyone Should Be Using in .NET
15:34
Просмотров 67 тыс.
Writing Compiled PowerShell Cmdlets by Thomas Rayner
1:28:11
PowerShell Scripts
49:37
Просмотров 82 тыс.