Search

  • how to establish and enter an implicit remote session using runspace in powershell

    Hi, I am trying to establish an implicit session with a remote host from my machine from a C# code. I am using runspace API for that. the code snippet is provided below Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); //constructing the vmname parameter here vmname = useralias + DateTime.Now.ToString(); Pipeline pipeline = runspace.CreatePipeline(); string scripttext = "$secpasswd = ConvertTo-SecureString '222_bbbb' -AsPlainText –Force"; string scripttext1
    Posted to Ask Don Jones (Forum) by manishjha on 01-18-2012
    Filed under: Test-Connection, Args, Parameter, scripts, PS Remoting, new-pssession, WMI, Remote PowerShell
  • Re: how to establish and enter an implicit remote session using runspace in powershell

    Hi Don, Thanks a lot for the prompt response! Yes, I stand corrected on this usage of 'implicit' remoting. Thanks for pointing that out. $s is treated as a PSSession object in the script as 'enter-PSSession' expects this object and not the string as the parameter. As for your last scenario, here's what i intend to do. I am on host A and I remote to host B. now I want host B to execute a script file that is on host B along with few parameters that i have passed from my session
    Posted to Ask Don Jones (Forum) by manishjha on 01-18-2012
    Filed under: Parameter, scripts, Passing arguments from batch file to powershell, PS Remoting, new-pssession, WMI, Remote PowerShell
  • Re: how to establish and enter an implicit remote session using runspace in powershell

    Thanks for the redirection provided. I have posted the new query at stackoverflow. link is given below for any future tracking for the users, Please redirect the query to your colleagues who may like to have a look at it. http://stackoverflow.com/questions/8913254/how-to-establish-and-enter-a-remote-session-using-runspace-in-powershell
    Posted to Ask Don Jones (Forum) by manishjha on 01-18-2012
  • how to establish and enter an implicit session using runspace

    Hi, I am trying to establish an implicit session with a remote host from my machine from a C# code. I am using runspace API for that. the code snippet is provided below this code is expected to enter into an implicit session with machine TS-TEST-09 and invoke the script helper.ps1 existing on that machine(that part is commented out in the code currently). now the problem is that i can't enter into the session $s using -Session parameter(highlighted) however i can enter into it using -Computername
    Posted to PowerShell and WMI (Forum) by manishjha on 01-11-2012
    Filed under: WMI, Remote PowerShell
  • Re: how to establish and enter an implicit session using runspace

    here is the code snippent of above problem statement. for some reason just could not paste it in original post. Thanks. ... Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); //constructing the vmname parameter here vmname = useralias + DateTime.Now.ToString(); Pipeline pipeline = runspace.CreatePipeline(); string scripttext = "$secpasswd = ConvertTo-SecureString '222_bbbb' -AsPlainText –Force"; string scripttext1 = "$mycreds = New-object -typename
    Posted to PowerShell and WMI (Forum) by manishjha on 01-11-2012
Page 1 of 1 (5 items) | RSS | More Search Options
Copyright 2012 PowerShell.com. All rights reserved.