powershell not able run on remote

Home Forums Scripting PowerShell powershell not able run on remote

This topic contains 1 reply, has 2 voices, and was last updated by JeremyW JeremyW 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Avatar
    vickynet
    Participant
    #617255

    Hi,

    I have script for creating bulk user in ad so i want run that in remote but CSV file that i have been included in localpath in the script so that its not working when i use invoke-command and its say could not find the file.

    could you help me on this issue and how can i run invoke-command using localpath.

    Thanks,
    Vignesh

    JeremyW
    JeremyW
    Moderator
    #617272

    Hi Vignesh.

    I’m assuming the CSV is local on your computer but you want the remote computer to use it. You could import the CSV locally and then use it on the remote computer.

    e.g.:

    Note the use of “using:” in the variable. That indicates that the variable to use is from the local computer and not the remote computer. More info: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_variables?view=powershell-6

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.