• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Change IP powershell script does not execute properly

    Scheduled Pinned Locked Moved
    Windows Problems
    1
    2
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mcheung
      last edited by

      Hi folks, I hope someone can help me with this. I wrote a powershell snapin script to re-IP a machine according to what it finds for the hostname through nslookup. When I run it manually, it works just fine. When I try through fog, it returns with 1. I tried logging stuff to a file, but the file does not get created.

      I’m having the FOG server run it with the following (and confirmed the path is correct):

      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

      I’ve tried running this (through fog and manually) on a Windows XP and Windows 7 systems and it consistently fails through FOG, but works manually.

      Anyone have any ideas?

      TIA

      1 Reply Last reply Reply Quote 0
      • M
        mcheung
        last edited by

        I believe I figured out the problem. FOG uploads the script <FOG install dir>/tmp/ since I used the default path, <FOG install dir> equates to \program files\fog, assuming that FOG sends the full path to the executing command, there will be a space in the script name, which would cause (powershell at least) it to croak. I uninstalled and reinstalled into \FOG and that seems to have fixed my issue…

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        158

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project