Remote Execution of a script with Get-Child Item cannot find path

Hello!
I have been tackling this problem for a few days now and I just can't find the answer.
I want to execute scripts remotely in parallel so that each of remote machine will run the script with their own resources.
Below is just the simple script in the local machine server1
$Folder = \\server1\folder\subfolder
GCI $folder
It works fine it I call that through my client with this I am using in my client
invoke-command -computername server -scriptblock {powershell.exe C:\filepath\script.ps1}
But if I change the script inside to look at another machine server 2 and do
$folder = \\server2\folder\subfolder
It generates an error that it cannot find that path when trying to call GCI remotely. Note that it still works if the script is run locally.
I did some research and I see about the double-hop using credssp but I just can't get it to work.
Any help would be appreciated.

Each system that you're remoting into (or calling Invoke-Command against) will need to have the WSManCredSSP server role enabled. You can do this through group policy, or you can do it on a per-machine basis. Here's what you would run on a computer if you
want to only enable it on certain computers (you should be able to run this remotely):
Enable-WSManCredSSP -Role Server
The system that you're running everything from will be the CredSSP client. You'll need to run this from it:
Enable-WSManCredSSP -Role Client -DelegateComputer *.yourdomain.com
You'll need to change the 'yourdomain.com' to your domain name (or, you could simply put a * for the delegate computer, just be aware that this will allow your computer to pass credentials along to any computer when you tell a cmdlet to use CredSSP authentication).
Now, to use Invoke-Command, do this:
$cred = Get-Credential
Invoke-Command -computername server.yourdomain.com -scriptblock {"Commands go here"} -Authentication CredSSP -Credential $cred
Notice that the -ComputerName parameter is using a fully qualified domain name. If your -DelegateComputer parameter above used a domain name, you'll have to have the FQDN here.
Let me know if that works for you. If you want more information, you can check out the Enable-WSManCredSSP and Disable-WSManCredSSP help topics.
Hi Rohn,
I tried doing your instruction but it gives me this error
Connecting to remote server failed with the following error message : The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
After enabling the client and server with the wsmancredssp
Here is the command I executed that produced the error
invoke-command -computername server01.domain01 -scriptblock {get-process} -authentication credssp -credential $cred.
Thank you very much for all the help.

Similar Messages

  • Get-Item: Cannot find path ' ' because it does not exist. While running Powershell script.

    I am trying to run a PowerShell script to upload files into a SharePoint site in an Azure environment...the script works fine on my local machine, but every time I run it in Azure (remotely), I get errors. Here is what my simple script looks like...
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    Write-Host "Loading Sharepoint Module "
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    Add-PSSnapin -Name Microsoft.SharePoint.PowerShell
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell) -eq $null )
    Write-Host "Failed to load sharepoint snap-in. Could not proceed further, Aborting ..."
    Exit
    #Script settings
    $webUrl = "http://sampleWebUrl"
    $docLibraryName = "My Documents"
    $docLibraryUrlName = "My%20Documents"
    $localFolderPath = get-childitem "C:\Upload\Test Upload\My Documents\" -recurse
    $contentType = "ContenttType1"
    #Open web and library
    $web = Get-SPWeb $webUrl
    write-host "Web:" $web
    $docLibrary = $web.Lists[$docLibraryName]
    write-host "docLibrary:" $docLibrary
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    write-host "files:" $files
    If ($contentType = "ContenttType1")
    #Open file
    $fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
    # Gather the file name
    $FileName = $File.Name
    #remove file extension
    $NewName = [IO.Path]::GetFileNameWithoutExtension($FileName)
    #split the file name by the "-" character
    $FileNameArray = $NewName.split("_")
    $check = $FileNameArray.Length
    #Add file
    $folder = $web.getfolder($docLibrary.rootFolder.URL)
    write-host "Copying file " $file.Name " to " $folder.ServerRelativeUrl "..."
    $spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    write-host "Success"
    write-host "SP File:" $spFile
    write-host "SP Item" $spItem
    #populate columns
    $spItem["Column1"] = $FileNameArray[0]
    $spItem["Column2"] = $FileNameArray[1]
    $spItem.Update()
    $fileStream.Close();
    Again, I can run this on my local machine and it works just fine, but when I attempt to run it on the Azure environment I get this error...
    Get-Item : Cannot find path 'C:\powershellscripts\12653_B7045.PDF' because it does not exist.
    At C:\PowerShellScripts\Upload-FilesIntoSharePointTester.ps1:32 char:42
    +     $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (C:\powershellscripts\12653_B7045.PDF:String) [Get-Item], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
    What strikes me first is the fact that the file its looking for is in the "C:\Upload\Test Upload\My Documents\" directory, but the error keeps saying "C:\powershellscripts\" which is where my script resides and not the files I want to
    upload into SharePoint. When I step through the code, all the variables are holding the correct values. The $localFolderPath shows the name of files that I am attempting to upload, so it recognizes them. But once I step through this particular line of code,
    the error occurs...
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    Is this an error caused because I am remoting into the Azure environment? Has anyone dealt with this issue before? I would really appreciate the help. Thanks
    Update: quick thing I noticed is that these two lines of code are returning null values. Again, is this handled differently in Azure or remotely? I ask cause this is the way I know how to do this, locally.
    $docLibrary = $web.Lists[$docLibraryName]
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()

    "...square brackets are wildcard characters in Windows PowerShell..."
    When you use cd without a parameter it uses the -Path parameter. In this case you'll have to escape the square brackets so they are not considered wildcards. Each of the commands in the first example does the exact same thing.
    cd 'Learn PowerShell `[Do Whatever`]'
    cd -Path 'Learn PowerShell `[Do Whatever`]'
    cd (or Set-Location) also has a literal path parameter (-LiteralPath) that does not require using an escape character (`) before each of the brackets. Hope this helps.
    cd -LiteralPath 'Learn PowerShell [Do Whatever]'

  • Issue using Get-Child-Item

    Have a function that will scan (grep) files in a folder with a certain extension.  For some reason, Get-Child-Item always returns empty / 0 files on my folder even though you can look at the folder and see files of the specified extension (*.config).
     Suspect either I am doing something wrong or permissions are somehow getting in the way.  How do you properly use Get-ChildItem
    in this context?
    function scan-Files
    param(
    [parameter(mandatory=$True)]
    [string]$folder,
    [parameter(mandatory=$True)]
    [string]$filePattern,
    [parameter(mandatory=$False)]
    [bool]$recurse = $False
    Write-Host "Folder = $folder"
    Write-Host "FilePattern = $filePattern"
    $files = Get-ChildItem -Include $filePattern -Path $folder
    #always empty for some reason
    if ($files)
    Write-Host "File count = $($files.Length)"
    }...#Invoke our function$folder = "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\"
    $filePattern = "*.config"         
    #scan-Files -folder $folder -filePattern $filePattern -recurse:$true
    scan-Files -folder $folder -filePattern $filePattern

    The Gods of the computer demand it.  Without it you are only enumerating a folder item.  With it you are enumerating the contents of the folder.  Include only works on files that have been selected.
    Example:
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\*.txt' -include *.config
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\*.c*' -include *.config
    dir 'C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer' -filter *.config
    Try all to see how they work.
    \_(ツ)_/

  • Detail entity Location with row key null cannot find or invalidate its owni

    I have a simple parent child relationship generated in ADF BC. It's 1 to many...a Work Request can have one or more Locations. If I turn on Composition Association in my assoc definition, I get "oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity Location with row key null cannot find or invalidate its owning entity." The error occurs on the CreateInsert for the Location entity. I've spent hours looking at other solutions and posts about this issue to no avail, including attempting both methods at the below post.
    http://radio.weblogs.com/0118231/stories/2003/01/17/whyDoIGetTheInvalidownerexception.html
    When I turn off Composition Association and I only add one Location to the Work Request, both the CreateInsert and the Commit work properly. However, if I add a second Location, I get a database constraint violation because ADF BC tries to commit the Location before the Work Request. I have verified that the Work Request Id is populated properly on the Location object, so I'm at a loss at this point. I'm on 11.1.1.3.

    Here's the answer in case someone else burns a day on this like I did. Turns out it's a bug (SR submitted), and one that's easy to recreate. The problem is that the parent object isn't "initialized" until after one of it's setters are called. So, what was happening was that I was invoking CreateInsert on the parent, then CreateInsert on the child, then setting properties on the child. So, since I invoked setters on the child first, the child is initialized first, and is thus ADF BC atttempts to insert it first upon commit. The strange thing is that the child had the correct ID for it's associated parent in the logs. Anyways, here are the steps to easily recreate:
    1. Model a simple parent child relationship (1 to many, not sure if that matters).
    2. Generate the ADF BC components (entity, assoc, vo's, and view links).
    3. Ensure that Composition Association is checked in the Assoc object.
    4. Add the parent to the app module, then add the child nested below it.
    5. Create a new task flow and drop CreateInsert for the parent object onto the flow. Make this the default activity
    6. Drop the CreateInsert from the child object onto the task flow, and link it as the outcome of the parent's CreateInsert
    7. Drop a page fragment onto the task flow that is bound to the parent object, and make it the third step in the task flow.
    8. Drop a commit onto the task flow as the forth step, and place the button on the page that invokes the action corresponding to the commit.
    Run it. As soon as the CreateInsert is hit for the child, the error is thrown.
    Another associated bug is that (appears to have the same culprit) the child will not be inserted unless one of it's attributes is set (note that you have to turn off Composition Association to get the above error to disappear). However, the child will not be inserted into the database unless one of its setters are invoked.
    **The workaround is to use CreateWithParams instead of CreateInsert in order to create the parent object, and pass in at least one parameter to set an attribute on the parent (even to blank). The same must be done on the child unless one of it's setters are invoked.
    Note that we're using SQL Server 2008 R2. This appears to be a problem with ADF BC and not with the target DB platform, but I have not tested with Oracle.

  • Bearts Audio Control Pannel will not open. Get error message cannot find startup file

    Bearts Audio Control Pannel will not open. Get error message cannot find startup file!
    Downloaded and instaled up-date for IDT audio from driver up-date. After installation could no longer oppen Beats Audio Control Pannel.  Looked for download to re-install BEATS Audio but cannot find one.
    Any suggestions.
    Sound works with IDT driver installed.
    Pavilion P7-1500Z

    Hi,
    Try using Recovery Manager to reinstall the IDT HD Audio Driver ( this will also reinstall the Beats Audio interface ) - the procedure for using recovery manager to reinstall Software and Drivers is detailed in the document on the link below.
    Recovery Manager - Windows 8.
    Recovery Manager - Windows 7
    After the reinstallation has completed, restart the PC.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Detail entity with row key null cannot find or invalidate it

    hi am trying to insert parent table values and child table values same time in same view,am in jdeveloper 11.1.1.6.0 am geting this error
    the error happen when i click createinsert ,am doing this in testmodel
    93] executeQueryForCollection ViewObject:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1, RowSet:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [94] _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1>#q computed SQLStmtBufLen: 137, actual=110, storing=140
    [95] SELECT LutProfcategory.PROFCATCODE,         LutProfcategory.PROFCATEGORY FROM LUT_PROFCATEGORY LutProfcategory
    [96] ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1 Created new QUERY statement
    [97] Bind params for ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1
    [98] For RowSet : _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [99] Passing to detail entity.create: CadaccUserFkAssoc.UamCadastreaccounts = oracle.jbo.Key[11309 ]
    [100] OracleSQLBuilder Executing doEntitySelect on: LUT_COUNTRY (false)
    [101] Built select: 'SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry'
    [102] Executing FAULT-IN...SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry WHERE COUNTRYCODE=:1
    Exception in thread "AWT-EventQueue-0" oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamUserdetails with row key null cannot find or invalidate its owning entity.
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at model.Entity.UamUserdetailsImpl.create(UamUserdetailsImpl.java:913)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2498)
         at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11042)
         at oracle.jbo.jbotester.NavigationBar.doInsertAction(NavigationBar.java:136)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:109)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Edited by: adf009 on 2013/04/19 1:23 PM
    Edited by: adf009 on 2013/04/19 1:24 PM

    Hi,
    I assume this is a child entity in a composition association. So when you create the rows for the child entity do you populate the parent's reference key ?
    You can use NameValuePairs
    NameValuePairs nvps=new NameValuePairs();
    nvps.setAttribute("ForeignKeyReference", value);
    createAndInitRow(nvps);
    Regards,
    Ramandeep

  • Help with Detail entity Insert with row key null cannot find or invalidate

    Hi,
    My Problem:
    I have created a form in JDeveloper ADF. This form is based on the Table Name IT_HARDWARE. The IT_HARDWARE keep track of all the hardware and it is in the relationship with the IT_SYSTEM table, IT_LOCATION, EMPOYEES. So the IT_HARDWARE has a FOREIGN KEY from IT_SYSTEM (SYS_ID), IT_LOCATION (LOC#), EMPLOYEE (EIP#).
    When I create a form to insert data into this form, I receive message "Detail entity ItHardwareInsert with row key null cannot find or invalidate its owning entity."
    I tried all possible to understand what is causing this and I can't find it. Can someone help me?

    Than you for the link, I appreciate it. I kind understand the root of the problem, but since I am new to JDeveloper, I am getting trouble to solve the problem. I am going to read and understand what is going on. Thank you for the link.

  • I have an iphone 4, i connect it to my laptop using the usb and then when connecting to itunes it says my phone is not up to date with itunes yet i cannot find an update 11.1 for my phones itunes? someone please help me.. kind regards

    i have an iphone 4, i connect it to my laptop using the usb and then when connecting to itunes it says my phone is not up to date with itunes yet i cannot find an update 11.1 for my phones itunes? someone please help me.. kind regards

    Itunes 11.1 is for your computer, not your iphone
    It is required in order to sync with ios 7.

  • I have Adobe Design Standard CS6 purchased 2013 with serial number but cannot find to download it onto a new mac laptop. When I try and add the 24-digit serial number to my account it doesn't seem to work?

    I have Adobe Design Standard CS6 purchased 2013 with serial number but cannot find to download it onto a new mac laptop. When I try and add the 24-digit serial number to my account it doesn't seem to work?

    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    You can also download the trial version of the software thru the page linked below and then use your current serial number to activate it.
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site and have cookies enabled in your browser or else the download will not work properly.
    CS6: http://prodesigntools.com/adobe-cs6-direct-download-links.html

  • Trying to publish a slideshow with music on iCloud cannot find publish?

    Trying to publish a slideshow with music on iCloud cannot find publish?

    You must do this using the iPhoto app: http://support.apple.com/kb/PH14502

  • How do i save a .png with transparent background?  cannot find in help

    how do i save a .png with transparent background?  cannot find in help

    rickseng
    With what program are you working and with what version of the program and on what computer operating system?
    I suspect that you are working with some version of Photoshop Elements. If that is correct, then be advised that some how
    your thread got posted in the Adobe Premiere Elements Forum (video editing) instead of the Adobe Photoshop Elements Forum (photo editing).
    If Photoshop Elements question, then please re-post your thread in the Adobe Photoshop Elements Forum or wait for a moderator
    here to see your thread here and move it from here to there.
    Photoshop Elements
    Thought....if are creating an image on a transparent background in Photoshop Elements Windows for a Premiere Elements Windows project, then you Save As png or psd.
    Please clarify if I have misinterpreted your question.
    Thank you.
    ATR

  • When I try and share to anything, I get "This item cannot be shared while it is still referencing media on the camera."

    When I try and share to anything such as a File or iTunes, I get "This item cannot be shared while it is still referencing media on the camera."  I've tried to consolidate all media but I'm not sure what else to try here.  If I remove the memory card from my Mac, then the project/movie I made can't "see" the clips.  Any ideas?

    Hit Command-9 to open the Background Tasks.
    Is anything active?
    Al

  • Cannot sync my iPhone 4 with iTunes says it cannot find device

    Cannot sync iPhone 4 with I tunes says cannot find device

    I was on 10.5.8 so I ordered the disc from apple, it cost £13. This updated me to 10.6.3, and from there you can do a free upgrade from the apple website to 10.6.8. And I now actually have the problem solved, I just had to restore the iPhone in iTunes and it synced correctly. Looks like it was a little glitch in the phone!

  • Remote Execution from Powershell Script called from Team Foundation Build

    Hello
       I am trying to deploy a sharepoint solution with a sharepoint script, with this approach:
    First i test the environment, using windows powershell console
    New-PSSession -ComputerName developmentserver01
    Enter-PSSession -computername developmentserver01
    d:
    cd d:\deploymentscripts
    .\deploysharepoint.ps1
     Then i start the automation:
       1.- TFS runs a build that call at the end to "deploy.ps1" locally in the build server. ---> this is working.
       2.- desploy1.ps1 copy the drop files to the development environment developmentserver01 shared folder.
       3.- after copy the files,  deploy1.ps1 connet with the development environment machine developmentserver01  using remote connection commands from powershell -->this is working.
       4.- this step fails, in this step i try to execute the deployment script deploySharepoint.ps1 that has copied in the development environment machine in the step 2.
         First using commands inside the script like in the powershell console, but i see that the commands are running inside the TFS build machine not in the machine that i connected whit remote connection
    d:
    cd d:\deploymentscripts
    .\deploysharepoint.ps1Later using different options (invoke-command, ...) only this optionk works:
    Invoke-Command -computername developmentserver01 -scriptblock{d:\DeploymentScripts\deploysharepoint.ps1 -solutionNames @("parameter1")}
    The problem it´s that i think that invoke-command don´t work like the commands using powershell console , because the script show the error that the user don´t haver permissions for accesing the Farm of sharepoint. If i run the script with remote session in a power shell console as show at the beginning of the post, all things work fine. How can i run the remote script deploysharepoint.ps1 with remote session from the script desploy.ps1, like using powershell console?

    have you tried passing credentials to it maybe use credssp, you could pass new session to your invoke-command although this shouldnt make difference, i basically think that when you opened this ps session it sees you admin therefore when you do the enter
    session you are still admin, when you use the invoke i am not so sure it keeps your creds..
    $s = New-PSSession -ComputerName developmentserver01
    Invoke-Command -session $s -scriptblock{d:\DeploymentScripts\deploysharepoint.ps1 -solutionNames @("parameter1")}

  • How do I reinstall Lion if I get a new hard drive?  My mac came with Leopard and I cannot find my upgrade disk for Snow Leopard

    My MacBook Pro originally came with Leopard.  I have the OS and Applications disks for Leopard but I cannot find my upgrade disk for Snow Leopard.  I would like to perform a clean install of Lion on the new hard drive and restore some data from my Time Machine backup.  I am not looking to restore the current image to my new hard drive.  I have not yet removed the exisiting hard drive nor have I wiped my data.

    The only way to do that is to buy a New SL Retail DVD. Or you could buy the Lion Install USB thumb drive from Apple for $69.
    You must have SL installed to then install Lion or have a thumb drive with the Lion installer.
    You could also create a Lion USB Recovery thumb drive using Lion Disk Assistant. But you need to have Lion already installed and the Lion RecoveryHD Partition on your drive to make the Recovery thumb drive.
    Lion Recovery Disk Assistant

Maybe you are looking for

  • How to move an old iTunes folder into a new user account?

    Hi there, so I have a 98Gb iTunes library and it was sitting on an older version of an iMac (2006 OSX 10.6.8  iTunes 11.4).  Realised it would be cumbersome to transfer to my newer iMac (2014 - OSX 10.9.5 iTunes 12.1.2.27) so I used the migration ass

  • Can't install Bonjour on Windows 7 (RTM 7600)

    I keeps giving me the following error: "Service 'Bonjour Service' failed to start. Verify that you have sufficient privilege to start system services" I have tried both running as administrator and also trying to run it through windows XP compatibili

  • How I can print bordeless picture?

    Hi: Print option in LR requires margins to be larger than 0.25" (and bottom margin larger than 0.56"). How I can overcome this requrement and print borderless picture?

  • Error in cancel excise invoice

    Hi, When i try to canccel the excise document in J1IH, i get the error as Message: 4F235,Reference of xxxxx/YYYY exists in open ARE document. but, no ARE exists for this document. Please let me know how to cancel this document. Thanks & regards, Pras

  • Display longtext in CATS

    Hello Folks, We are using CATS for service provider and there is an option in the trx CATSXT that allows user to put a long text in the structure field "LONGTEXT_ICON" for every posted hour. My requirement now is to extract this text in a report. Whe