Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# accessing a windows api Pin
Pete O'Hanlon13-Jun-13 9:48
mvePete O'Hanlon13-Jun-13 9:48 
GeneralRe: C# accessing a windows api Pin
DaveyM6913-Jun-13 9:52
professionalDaveyM6913-Jun-13 9:52 
GeneralRe: C# accessing a windows api Pin
Eddy Vluggen13-Jun-13 9:53
professionalEddy Vluggen13-Jun-13 9:53 
QuestionC# using WPF Pin
classy_dog12-Jun-13 12:16
classy_dog12-Jun-13 12:16 
AnswerRe: C# using WPF Pin
Pete O'Hanlon12-Jun-13 12:31
mvePete O'Hanlon12-Jun-13 12:31 
AnswerRe: C# using WPF Pin
Richard MacCutchan12-Jun-13 21:12
mveRichard MacCutchan12-Jun-13 21:12 
AnswerRe: C# using WPF Pin
classy_dog13-Jun-13 9:06
classy_dog13-Jun-13 9:06 
QuestionServer 2012 remote powershell with C# Pin
JD8612-Jun-13 9:26
JD8612-Jun-13 9:26 
I'm having the toughest time finding / figuring out how to get remote powershell working with 2012.

Currently this is my code:

C#
private void OpenRunspace(string username, string password, ref Runspace remoteRunspace)
        {
            // Convert plain text password to secure string
            SecureString pass = new SecureString();
            foreach (char c in password.ToCharArray())
            {
                pass.AppendChar(c);
            }

            PSCredential psc = new PSCredential(username, pass);
            WSManConnectionInfo wmci = new WSManConnectionInfo(new Uri("http://" + ConfigurationManager.AppSettings["ExchangeServer"] + "/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", psc);
            wmci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
            wmci.ProxyAuthentication = AuthenticationMechanism.Negotiate;

            wmci.SkipCACheck = true;
            wmci.SkipCNCheck = true;
            remoteRunspace = RunspaceFactory.CreateRunspace(wmci);
        }



The error I keep getting is "Access is denied". I've verified the credentials I am passign to it is part of the REmote Management Users group on that local server, ran the Set-User "Administrator" powershell enabled command in Exchange 2013

What else am I missing here?
QuestionDB Connection Pin
mynamearan12-Jun-13 3:25
mynamearan12-Jun-13 3:25 
AnswerRe: DB Connection Pin
V.12-Jun-13 3:31
professionalV.12-Jun-13 3:31 
GeneralRe: DB Connection Pin
mynamearan13-Jun-13 4:05
mynamearan13-Jun-13 4:05 
GeneralRe: DB Connection Pin
V.13-Jun-13 20:02
professionalV.13-Jun-13 20:02 
AnswerRe: DB Connection Pin
Dave Kreskowiak12-Jun-13 3:54
mveDave Kreskowiak12-Jun-13 3:54 
QuestionRe: DB Connection Pin
mynamearan13-Jun-13 4:11
mynamearan13-Jun-13 4:11 
AnswerRe: DB Connection Pin
Dave Kreskowiak13-Jun-13 8:14
mveDave Kreskowiak13-Jun-13 8:14 
Questioncan I use root in MySQL? Pin
Jassim Rahma12-Jun-13 0:23
Jassim Rahma12-Jun-13 0:23 
SuggestionRe: can I use root in MySQL? Pin
Eddy Vluggen12-Jun-13 1:29
professionalEddy Vluggen12-Jun-13 1:29 
AnswerRe: can I use root in MySQL? Pin
Dave Kreskowiak12-Jun-13 3:56
mveDave Kreskowiak12-Jun-13 3:56 
AnswerRe: can I use root in MySQL? Pin
jschell12-Jun-13 8:48
jschell12-Jun-13 8:48 
QuestionC# Attributes Pin
jeramyRR11-Jun-13 22:24
jeramyRR11-Jun-13 22:24 
AnswerRe: C# Attributes Pin
Bernhard Hiller11-Jun-13 22:51
Bernhard Hiller11-Jun-13 22:51 
Question/r is removed from string parameter Pin
Rock Star.11-Jun-13 21:30
Rock Star.11-Jun-13 21:30 
AnswerRe: /r is removed from string parameter Pin
Bernhard Hiller11-Jun-13 22:54
Bernhard Hiller11-Jun-13 22:54 
AnswerRe: /r is removed from string parameter Pin
Ron Beyer12-Jun-13 5:48
professionalRon Beyer12-Jun-13 5:48 
AnswerRe: /r is removed from string parameter Pin
jschell12-Jun-13 8:53
jschell12-Jun-13 8:53 

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.