¡@

Home 

c# Programming Glossary: powershell

HTTPS from a console application?

http://stackoverflow.com/questions/10274207/https-from-a-console-application

the certificate of server thumbprint you can run this in PowerShell getThumb Get ChildItem path cert LocalMachine TrustedPeople..

Get MIME type from filename extension

http://stackoverflow.com/questions/1029740/get-mime-type-from-filename-extension

octet stream .ps application postscript .psc1 application PowerShell .psd application octet stream .psess application xml .psm application..

Capturing Powershell output in C# after Pipeline.Invoke throws

http://stackoverflow.com/questions/1233640/capturing-powershell-output-in-c-sharp-after-pipeline-invoke-throws

errors string script @ 'Hello World' ps _.name out string1 PowerShell powerShell PowerShell.Create powerShell.AddScript script var.. 'Hello World' ps _.name out string1 PowerShell powerShell PowerShell.Create powerShell.AddScript script var results powerShell.Invoke..

Execute PowerShell as an administrator from C#

http://stackoverflow.com/questions/1313673/execute-powershell-as-an-administrator-from-c-sharp

PowerShell as an administrator from C# I have the following C# code using.. to the registry key 'HKEY_LOCAL_MACHINE SOFTWARE Microsoft PowerShell 1 ShellIds Microsoft.PowerShell' is denied. According to this.. SOFTWARE Microsoft PowerShell 1 ShellIds Microsoft.PowerShell' is denied. According to this the solution is to start PowerShell..

Invoking powershell cmdlets from C#

http://stackoverflow.com/questions/17067971/invoking-powershell-cmdlets-from-c-sharp

how to call PS cmdlets from C# and have come across the PowerShell class. It works fine for basic use but now I wanted to execute.. class but I can't seem to do this. This is my code so far PowerShell ps PowerShell.Create ps.AddCommand Get ChildItem ps.AddCommand.. seem to do this. This is my code so far PowerShell ps PowerShell.Create ps.AddCommand Get ChildItem ps.AddCommand where object..

How can I determine for which platform an executable is compiled?

http://stackoverflow.com/questions/197951/how-can-i-determine-for-which-platform-an-executable-is-compiled

by examining the files themselves. My target language is PowerShell but a C# example will do. Failing either of those if you know..

Adding scripting functionality to .NET applications

http://stackoverflow.com/questions/260/adding-scripting-functionality-to-net-applications

a compiler in .NET. A different angle altogether is to try PowerShell . There are numerous examples of embedding PowerShell into an.. try PowerShell . There are numerous examples of embedding PowerShell into an application here's a thorough project on the topic Powershell..

Execute PowerShell Script from C# with Commandline Arguments

http://stackoverflow.com/questions/527513/execute-powershell-script-from-c-sharp-with-commandline-arguments

PowerShell Script from C# with Commandline Arguments I need to execute.. from C# with Commandline Arguments I need to execute a PowerShell script from within C#. The script needs commandline arguments... pipeline.Commands.Add scriptFile Execute PowerShell script results pipeline.Invoke scriptFile contains something..

Lex/Yacc for C#?

http://stackoverflow.com/questions/540593/lex-yacc-for-c

Post build event execute powershell

http://stackoverflow.com/questions/6500320/post-build-event-execute-powershell

an example First of all you must be aware of the fact that PowerShell must be configure to execute scripts. The following line allow.. be configure to execute scripts. The following line allow PowerShell to execute scripts Set ExecutionPolicy unrestricted Special.. 2010 executable is a 32Bits exe so you need to allow PowerShell 32 to execute scripts. Once here you can go in your project..

Calling CreateProcessAsUser from C#

http://stackoverflow.com/questions/668389/calling-createprocessasuser-from-c-sharp

currently using to start the new process a console process PowerShell to be specific though it shouldn't matter . private void StartProcess..

Using Side-by-Side assemblies to load the x64 or x32 version of a DLL

http://stackoverflow.com/questions/108971/using-side-by-side-assemblies-to-load-the-x64-or-x32-version-of-a-dll

a temporary folder for the tests and run command line or powershell whose current working directory is set to this location e.g...

Run Powershell-Script from C# Application

http://stackoverflow.com/questions/11120452/run-powershell-script-from-c-sharp-application

Script from C# Application I'm trying to execute a powershellscript from a c# application. The script has to be executed under.. scenarios some are working some not 1. direct call from powershell I've called the script directely from a ps console which is.. are differences and how to solve the problem c# c# 4.0 powershell console application share improve this question Have you..

How do you impersonate an Active Directory user in Powershell?

http://stackoverflow.com/questions/11806/how-do-you-impersonate-an-active-directory-user-in-powershell

an Active Directory user in Powershell I'm trying to run powershell commands through a web interface ASP.NET C# in order to create.. resultString obj.ToString return resultString c# asp.net powershell active directory share improve this question Here is a class..

Capturing Powershell output in C# after Pipeline.Invoke throws

http://stackoverflow.com/questions/1233640/capturing-powershell-output-in-c-sharp-after-pipeline-invoke-throws

the Powershell output that comes before the exception c# powershell powershell v1.0 share improve this question Not sure if.. output that comes before the exception c# powershell powershell v1.0 share improve this question Not sure if this is helpful...

Execute PowerShell as an administrator from C#

http://stackoverflow.com/questions/1313673/execute-powershell-as-an-administrator-from-c-sharp

. Is there a way to do this programmatically c# powershell share improve this question Check this out You need to impersonate..

Invoking powershell cmdlets from C#

http://stackoverflow.com/questions/17067971/invoking-powershell-cmdlets-from-c-sharp

powershell cmdlets from C# I'm trying to learn how to call PS cmdlets.. _.Length gt 1000000 I tried building this through the powershell class but I can't seem to do this. This is my code so far PowerShell.. it possible to run the Where Object cmdlet like this c# powershell share improve this question Length gt and 10000 are not..

How can I determine for which platform an executable is compiled?

http://stackoverflow.com/questions/197951/how-can-i-determine-for-which-platform-an-executable-is-compiled

if you know the logic required that would be great. c# powershell cpu architecture share improve this question from another..

Running a powershell command in C# errors with, “Cannot invoke this function because the current host does not implement it”

http://stackoverflow.com/questions/4219095/running-a-powershell-command-in-c-sharp-errors-with-cannot-invoke-this-functio

a powershell command in C# errors with &ldquo Cannot invoke this function.. This is an example of the relevant lines I use to run the powershell command. RunspaceConfiguration rsConfig RunspaceConfiguration.Create.. 'Main Campus Retention Policy' When I run this in powershell itself it works perfectly but when I try to run it using the..

How can I retrieve an assembly's qualified type name?

http://stackoverflow.com/questions/441680/how-can-i-retrieve-an-assemblys-qualified-type-name

PublicKeyToken b77a5c561934e089 c# asp.net configuration powershell web config share improve this question This is a nice handy.. from dance2die thought of putting together a sample powershell script to export the type name to a csv file. System.Reflection.Assembly..

Execute PowerShell Script from C# with Commandline Arguments

http://stackoverflow.com/questions/527513/execute-powershell-script-from-c-sharp-with-commandline-arguments

and make sure that spaces are no problem c# command line powershell scripting arguments share improve this question Try creating..

Post build event execute powershell

http://stackoverflow.com/questions/6500320/post-build-event-execute-powershell

build event execute powershell Is it possible to set up a .net project with a post build event.. set up a .net project with a post build event to execute a powershell script I am using this script to generate some files. Also can.. build to script. An example of this would be great. c# powershell msbuild share improve this question Here is an example First..

Is there an easy way to parse a (lambda expression) string into an Action delegate?

http://stackoverflow.com/questions/714799/is-there-an-easy-way-to-parse-a-lambda-expression-string-into-an-action-delega

allow an easy way of bulk updating account objects from a powershell script where the user can specify a lambda expression to perform..

Run Powershell-Script from C# Application

http://stackoverflow.com/questions/11120452/run-powershell-script-from-c-sharp-application

Powershell Script from C# Application I'm trying to execute a powershellscript..

How do you impersonate an Active Directory user in Powershell?

http://stackoverflow.com/questions/11806/how-do-you-impersonate-an-active-directory-user-in-powershell

do you impersonate an Active Directory user in Powershell I'm trying to run powershell commands through a web interface.. bad password . The biggest problem that I noticed was that Powershell was logged in as ASPNET instead of my Active Directory Account... instead of my Active Directory Account. How do I force my Powershell session to be authenticated with another Active Directory Account..

Capturing Powershell output in C# after Pipeline.Invoke throws

http://stackoverflow.com/questions/1233640/capturing-powershell-output-in-c-sharp-after-pipeline-invoke-throws

Powershell output in C# after Pipeline.Invoke throws I'm running a Powershell.. output in C# after Pipeline.Invoke throws I'm running a Powershell test script from a C# application. The script can fail due to.. System.Exception m_Runspace.Close How can I get to the Powershell output that comes before the exception c# powershell powershell..

DateTime.ParseExact string format exception

http://stackoverflow.com/questions/2000580/datetime-parseexact-string-format-exception

to date format strings here . You can use the following Powershell command to test them. DateTime ParseExact '01 01 2010' 'M d..

Adding scripting functionality to .NET applications

http://stackoverflow.com/questions/260/adding-scripting-functionality-to-net-applications

Looking for replacement for Snippet Compiler [closed]

http://stackoverflow.com/questions/2775055/looking-for-replacement-for-snippet-compiler

of LINQPad and it has completely stopped me from using Powershell ISE for this kind of thing. I hope one day to see a LINQShell..

Running a powershell command in C# errors with, “Cannot invoke this function because the current host does not implement it”

http://stackoverflow.com/questions/4219095/running-a-powershell-command-in-c-sharp-errors-with-cannot-invoke-this-functio

it&rdquo I have an application that I use to run Exchange Powershell commands inside C# code like below. This is an example of the..

C# Force Form Focus

http://stackoverflow.com/questions/46030/c-sharp-force-form-focus

that I am having is that I use the dll by loading it in a Powershell session. So when I try to display the form and get it to come.. but I can't for the life of me get it to display over the Powershell window. Here is the code that I am currently using to try and.. thread make it easier to cause it to get focus over the Powershell session Thanks in advance for the help. c# winforms share..

Can I run code from a .NET assembly from a command line?

http://stackoverflow.com/questions/6813557/can-i-run-code-from-a-net-assembly-from-a-command-line

Activator.CreateInstance(<guid>) works inside VSIDE but not externally

http://stackoverflow.com/questions/7289620/activator-createinstanceguid-works-inside-vside-but-not-externally

I have tried running the output binary through an elevated Powershell console and it still doesn't work. EDIT 2 Thus far the only..

Limit the number of parallel threads in C#

http://stackoverflow.com/questions/8853907/limit-the-number-of-parallel-threads-in-c-sharp

much longer time. Is it possible to convert the following Powershell example to C# Or is there any better framework such as Actor.. such as Actor framework in C# like F# MailboxProcessor Powershell example Update The connection to remote FTP server can be slow..

Possible to remove and add a reference to csproj programmatically via a batch file?

http://stackoverflow.com/questions/8955964/possible-to-remove-and-add-a-reference-to-csproj-programmatically-via-a-batch-fi

the need to update the reference. Update Solved using Powershell Please see this related question and answer on adding and removing.. and answer on adding and removing references using Powershell c# dll msbuild batch file csproj share improve this question..