Change IP powershell script does not execute properly
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):
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?
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…