Click here to Skip to main content
15,914,350 members
Home / Discussions / C#
   

C#

 
QuestionInsert into Text File from Sql Table Pin
Laji5912-May-09 4:33
Laji5912-May-09 4:33 
AnswerRe: Insert into Text File from Sql Table Pin
EliottA12-May-09 5:10
EliottA12-May-09 5:10 
QuestionHow do I tell my program which version of a COM DLL or OCX to use? Pin
Malleus1212-May-09 4:11
Malleus1212-May-09 4:11 
QuestionPowershell / C# guru advice needed Pin
Whydah12-May-09 4:03
Whydah12-May-09 4:03 
AnswerRe: Powershell / C# guru advice needed Pin
Eddy Vluggen12-May-09 4:52
professionalEddy Vluggen12-May-09 4:52 
GeneralRe: Powershell / C# guru advice needed - anyone ? Pin
Whydah12-May-09 6:42
Whydah12-May-09 6:42 
GeneralRe: Powershell / C# guru advice needed - anyone ? Pin
Dave Kreskowiak12-May-09 6:58
mveDave Kreskowiak12-May-09 6:58 
GeneralRe: Powershell / C# guru advice needed - anyone ? Pin
Whydah12-May-09 21:07
Whydah12-May-09 21:07 
Thanks for the tips Dave, but I am running a C# Socket server, asp.net and IIS are not involved in this application. My c# socket server listens on a port listens for a TcpClient, creates a NetworkStream, GetBytes from the client, covert those bytes to string, passes that string to RunShell method which executes that string as a power shell command, coverts that string to bytes, sends it off to the client.

The problem is that all the "string" commands executed by the powershell method are not executed the way they are on a regular powershell prompt. for example get-command works fine but get-alias does:

get-alias on regular powershell prompt:

CommandType Name Definition
----------- ---- ----------
Alias ac Add-Content
Alias asnp Add-PSSnapin
Alias clc Clear-Content

get-alias from my c# prompt:

Sending parameters: 'get-alias'...<done
Welcome to power shell server ...
ac
asnp
clc
cli


-----------

Any ideas?

Best Regards,
sk
GeneralRe: Powershell / C# guru advice needed - anyone ? Pin
Dave Kreskowiak13-May-09 2:01
mveDave Kreskowiak13-May-09 2:01 
GeneralRe: Powershell / C# guru advice needed - anyone ? Pin
Whydah13-May-09 3:22
Whydah13-May-09 3:22 
QuestionC# Max Interfaces? Pin
Jammer12-May-09 3:55
Jammer12-May-09 3:55 
AnswerRe: C# Max Interfaces? Pin
Pete O'Hanlon12-May-09 4:24
mvePete O'Hanlon12-May-09 4:24 
GeneralRe: C# Max Interfaces? Pin
Jammer12-May-09 9:17
Jammer12-May-09 9:17 
AnswerRe: C# Max Interfaces? Pin
Dave Kreskowiak12-May-09 4:51
mveDave Kreskowiak12-May-09 4:51 
GeneralRe: C# Max Interfaces? Pin
Jammer12-May-09 9:20
Jammer12-May-09 9:20 
Question3d graph from sql query Pin
laziale12-May-09 3:28
laziale12-May-09 3:28 
AnswerRe: 3d graph from sql query Pin
Giorgi Dalakishvili12-May-09 3:56
mentorGiorgi Dalakishvili12-May-09 3:56 
QuestionCrystal report Pin
KIDYA12-May-09 2:52
KIDYA12-May-09 2:52 
QuestionNeed Help with Beginner's Homework Assignment PinPopular
Mo Chips12-May-09 2:24
Mo Chips12-May-09 2:24 
AnswerRe: Need Help with Beginner's Homework Assignment Pin
Michael Bookatz12-May-09 2:30
Michael Bookatz12-May-09 2:30 
AnswerRe: Need Help with Beginner's Homework Assignment Pin
Nagy Vilmos12-May-09 2:30
professionalNagy Vilmos12-May-09 2:30 
GeneralRe: Need Help with Beginner's Homework Assignment Pin
Christian Graus12-May-09 2:42
protectorChristian Graus12-May-09 2:42 
AnswerRe: Need Help with Beginner's Homework Assignment Pin
Christian Graus12-May-09 2:30
protectorChristian Graus12-May-09 2:30 
AnswerRe: Need Help with Beginner's Homework Assignment Pin
OriginalGriff12-May-09 2:32
mveOriginalGriff12-May-09 2:32 
GeneralRe: Need Help with Beginner's Homework Assignment Pin
Mo Chips12-May-09 3:08
Mo Chips12-May-09 3:08 

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.