Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
Generalc# please give me a running program for Speechconvert to text Pin
Member 214622319-Jul-16 3:24
Member 214622319-Jul-16 3:24 
GeneralRe: c# please give me a running program for Speechconvert to text Pin
OriginalGriff19-Jul-16 4:07
mveOriginalGriff19-Jul-16 4:07 
QuestionHow can I monitor CPU and monitor utilisation for 1 process and plot in the graph Pin
anujlamba19-Jul-16 2:39
anujlamba19-Jul-16 2:39 
AnswerRe: How can I monitor CPU and monitor utilisation for 1 process and plot in the graph Pin
Richard MacCutchan19-Jul-16 3:11
mveRichard MacCutchan19-Jul-16 3:11 
QuestionSet RequestValidationMode at control level in web config Pin
Member 1264210518-Jul-16 21:22
Member 1264210518-Jul-16 21:22 
AnswerRe: Set RequestValidationMode at control level in web config Pin
Slacker00719-Jul-16 2:09
professionalSlacker00719-Jul-16 2:09 
SuggestionAbout Async Event Pin
Super Lloyd18-Jul-16 14:47
Super Lloyd18-Jul-16 14:47 
GeneralRe: About Async Event Pin
Brisingr Aerowing18-Jul-16 16:16
professionalBrisingr Aerowing18-Jul-16 16:16 
GeneralRe: About Async Event Pin
Super Lloyd18-Jul-16 16:57
Super Lloyd18-Jul-16 16:57 
GeneralRe: About Async Event Pin
Marc Clifton19-Jul-16 1:07
mvaMarc Clifton19-Jul-16 1:07 
GeneralRe: About Async Event Pin
Super Lloyd19-Jul-16 2:44
Super Lloyd19-Jul-16 2:44 
GeneralRe: About Async Event Pin
Marc Clifton19-Jul-16 1:50
mvaMarc Clifton19-Jul-16 1:50 
GeneralRe: About Async Event Pin
Richard Deeming19-Jul-16 1:55
mveRichard Deeming19-Jul-16 1:55 
AnswerRe: About Async Event Pin
Super Lloyd19-Jul-16 3:07
Super Lloyd19-Jul-16 3:07 
GeneralRe: About Async Event Pin
Super Lloyd19-Jul-16 3:19
Super Lloyd19-Jul-16 3:19 
GeneralRe: About Async Event Pin
Super Lloyd19-Jul-16 14:32
Super Lloyd19-Jul-16 14:32 
GeneralRe: About Async Event Pin
Richard Deeming20-Jul-16 1:51
mveRichard Deeming20-Jul-16 1:51 
GeneralRe: About Async Event Pin
Super Lloyd20-Jul-16 2:08
Super Lloyd20-Jul-16 2:08 
GeneralRe: About Async Event Pin
Richard Deeming19-Jul-16 1:54
mveRichard Deeming19-Jul-16 1:54 
GeneralRe: About Async Event Pin
Super Lloyd19-Jul-16 2:55
Super Lloyd19-Jul-16 2:55 
QuestionHow can I run multiple powershell commands in a C#/powershell runspace? Pin
turbosupramk318-Jul-16 4:02
turbosupramk318-Jul-16 4:02 
QuestionRe: How can I run multiple powershell commands in a C#/powershell runspace? Pin
Richard MacCutchan18-Jul-16 4:22
mveRichard MacCutchan18-Jul-16 4:22 
AnswerRe: How can I run multiple powershell commands in a C#/powershell runspace? Pin
turbosupramk318-Jul-16 4:35
turbosupramk318-Jul-16 4:35 
GeneralRe: How can I run multiple powershell commands in a C#/powershell runspace? Pin
Richard MacCutchan18-Jul-16 4:51
mveRichard MacCutchan18-Jul-16 4:51 
GeneralRe: How can I run multiple powershell commands in a C#/powershell runspace? Pin
turbosupramk318-Jul-16 4:58
turbosupramk318-Jul-16 4:58 
I should have removed the command1 and command2, those were just additional ways of me trying the same thing. Sorry about that.

Error message is

Quote:
- The term 'Import-Module' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. - System.Management.Automation - at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke(IEnumerable input) at System.Management.Automation.RemotePipeline.Invoke(IEnumerable input) at System.Management.Automation.Runspaces.Pipeline.Invoke() at exchangePictureUpdater.exchangePictureUpdater.btnAddReplace_Click(Object sender, EventArgs e) - Void CoreInvoke[TOutput](System.Collections.IEnumerable, System.Management.Automation.PSDataCollection`1[TOutput], System.Management.Automation.PSInvocationSettings) |


C#
Command command1 = new Command("set-adserversettings");
CommandParameter parameter1 = new CommandParameter("viewentireforest", true);
command1.Parameters.Add(parameter1);

Command command2 = new Command("set-userphoto");
CommandParameter parameter2a = new CommandParameter("identity", tbxName.Text);
CommandParameter parameter2b = new CommandParameter("picturedata", displayedImage);
CommandParameter parameter2c = new CommandParameter("domaincontroller", "adfadfadf.com");
CommandParameter parameter2d = new CommandParameter("confirm", false);
command2.Parameters.Add(parameter2a);
command2.Parameters.Add(parameter2b);
command2.Parameters.Add(parameter2c);
command2.Parameters.Add(parameter2d);

Pipeline pipeline = runspacee.CreatePipeline();

pipeline.Commands.Add(command1);
pipeline.Commands.Add(command2);

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.