All Questions
87 questions
0
votes
0
answers
55
views
Invoke Powershell to zip Archive a folder from C# app with native progress UI
The Compress-Archive command was found in the module Microsoft.PowerShell.Archive, but the module could not be loaded.For more information, run Import-Module Microsoft.PowerShell.Archive.
I'm trying ...
0
votes
1
answer
114
views
Trigger WPF doubleanimation from Powershell codebehind
This is Powershell/WPF (The loaded assemblies are pasted from my project and mostly not needed for this)
I am making an animated flyout button, it works as intended, I click the button, it slides into ...
0
votes
0
answers
77
views
Can a WPF animated button be reversed on the second click without codebehind?
Im using powershell w/WPF. I have the following example code that produces a button that animates by moving to the right when clicked, I am trying to figure out the best way of approaching clicking it ...
0
votes
0
answers
57
views
WPF Enable/Disable TextBox on click on MenuItem
I have added a ContextMenu to a button; now I want the textbox x:Name=Objektkennzeichen to be set to IsEnabled False or True for the MenuItems at the push of a button.
What do I have to put in Command?...
0
votes
0
answers
131
views
How can I use Powershell command Get-Mpthreat in C# (Visual Studio 2022)
I am currently doing a school internship and should now display the threats history. I've been stuck here for several hours and just can't get any further.
I don't know which "packages" I ...
2
votes
1
answer
3k
views
Cloud not load file or assembly 'System.Management.Automation' while running powershell script
So I am trying to run some powershell script on my WPF app to update my IpRules on Azure but even simple script like "Write-Output 'Hello, World!'" gives me this error:
Could not load file ...
0
votes
1
answer
71
views
Why are some of my PowerShell scripts not invoking with System.Management.Automation WPF?
namespace powershell_execution
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public ...
0
votes
1
answer
249
views
Execute Powershell cmdlet that have user prompts within C# WPF application
I am attempting to create a WPF application that will execute some powershell commands using a 3rd party module (ShareGate). After extensive research and banging my head on the keyboard, I have gotten ...
-1
votes
1
answer
690
views
Execute PowerShell script without 'PowerShell.SDK'
I want to execute the PowerShell script without SDK. In my project, I have to execute the PowerShell script and also want to create an EXE file for the same. But the problem is:
When I remove ...
0
votes
1
answer
1k
views
I get "Exception calling "Load" with "1" argument(s): "Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}Null'."
I am new to XAML and Visual Studio and am working on my first project. When try to load my code into Powershell, I get the following error,
"Exception calling "Load" with "1" ...
1
vote
0
answers
539
views
PowerShell WPF display in center of screen
I am using the following code to play a video at max size in the center of the screen. Issue is it is playing in the center of all of my monitors instead of the main window. How do I resolve this ...
0
votes
0
answers
114
views
Powershell script work in powershell but not in c#
Below scripts format work for me in powershell to remove package from another user but its not working on C#
other script working fine in c# like get all package , remove package for all user , I run ...
0
votes
1
answer
890
views
Show the output of Powershell script in a WPF application
I have a WPF application that executes a Powershell script and then displays a message in a textbox in the application. The Powershell script is executed like this:
string scriptPath = folderPath + &...
0
votes
0
answers
79
views
Changing SystemTime freezes WPF buttons
I faced a very weird situation. I'm working on an C# WPF application with MVVM pattern. The app has a page from where user can change system time. And there is a NEXT button, which is binded to an ...
0
votes
0
answers
78
views
How to change language of powershell script? [duplicate]
i have developed a project in WFP in which i launch a command via Powershell.exe, but i would like the return language of the script output to be English and not French, how can i do?
private void ...