Highlighted
Visitor.
1499 views

Download Image from Windows Server for WinPE Imaging

We are on ZCM 2017 Update 2a and all of our primary and satellites are Linux to last week I brought a Windows 10 server online and promoted it to the satellite role so I could test WinPE imaging using a server instead of a flash drive to host the images. The Windows satellite only has the imaging role assigned to it and I made sure the winpe.wim and imagex.exe 32 and 64 bit files synched to the server as well as the Tuxera driver. So if I build a preboot bundle with an action of ZENworks Imge and I enter the Windows server IP and path to the image file for example:
XXX.XXX.3.9
C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg

If I assign this bundle to a computer it copies the image fine. But when I use a third party script I get an error saying the image path is invalid. Here is the code:

$PROXYADDR='XXX.XXX.3.9'
...
Write-Host "Restoring Image..."
img -restorep "C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg" -ip=$PROXYADDR
Write-Host "Restoring Addons..."
img -rp \images\1709addons.zmg -ip=$PROXYADDR -ap=a1:p3
Write-Host "Restoring Drivers..."
img -rp \images\$drivers -ip=$PROXYADDR -ap=a1:p3

The first img command gives the image path is invalid while the last two give an error invalid physical partition specified. This makes sense since the partitions are not written until 1709WinPE.zmg is copied. I tried img -rp, -restorep and I have also set the path to \images\1709WinPE.zmg and \\ASC-WIN2016\content-repo\images\1709WinPE.zmg. On the server itself I have shared the images folder and gave everyone full rights to it. Yet after all this I still get the error. One thing I do notice is that another primary is being used to copy the winpe.wim file to the computer and initiate the third party imaging script. Only in the script do I specifically set the Windows imaging server IP. So my questions are:

1. Why can the 1709WinPE.zmg file download fine to a computer using a preboot bundle but not a third party imaging script?

2. How do you set a preferred imaging server to an OU? My guess is because another imaging server is doing the work, there are permission issues when the third-party script tries to access the server.

Any advice is appreciated.
Labels (1)
0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Download Image from Windows Server for WinPE Imaging

Keep in mind your "IMG" commands are using TFTP not a share.
ImageX and WIM files are using Shares.....

Try running the commands via the command line one by one....
Start using the Physical address instead of a var and then work back from there....
If you narrow issue down to var....a different var may work best since you are trying to redefine a "Well known" variable which may not be working....since it is really the 1st server from your files were delivered...




ecmastrean;2486623 wrote:
We are on ZCM 2017 Update 2a and all of our primary and satellites are Linux to last week I brought a Windows 10 server online and promoted it to the satellite role so I could test WinPE imaging using a server instead of a flash drive to host the images. The Windows satellite only has the imaging role assigned to it and I made sure the winpe.wim and imagex.exe 32 and 64 bit files synched to the server as well as the Tuxera driver. So if I build a preboot bundle with an action of ZENworks Imge and I enter the Windows server IP and path to the image file for example:
XXX.XXX.3.9
C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg

If I assign this bundle to a computer it copies the image fine. But when I use a third party script I get an error saying the image path is invalid. Here is the code:

$PROXYADDR='XXX.XXX.3.9'
...
Write-Host "Restoring Image..."
img -restorep "C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg" -ip=$PROXYADDR
Write-Host "Restoring Addons..."
img -rp \images\1709addons.zmg -ip=$PROXYADDR -ap=a1:p3
Write-Host "Restoring Drivers..."
img -rp \images\$drivers -ip=$PROXYADDR -ap=a1:p3

The first img command gives the image path is invalid while the last two give an error invalid physical partition specified. This makes sense since the partitions are not written until 1709WinPE.zmg is copied. I tried img -rp, -restorep and I have also set the path to \images\1709WinPE.zmg and \\ASC-WIN2016\content-repo\images\1709WinPE.zmg. On the server itself I have shared the images folder and gave everyone full rights to it. Yet after all this I still get the error. One thing I do notice is that another primary is being used to copy the winpe.wim file to the computer and initiate the third party imaging script. Only in the script do I specifically set the Windows imaging server IP. So my questions are:

1. Why can the 1709WinPE.zmg file download fine to a computer using a preboot bundle but not a third party imaging script?

2. How do you set a preferred imaging server to an OU? My guess is because another imaging server is doing the work, there are permission issues when the third-party script tries to access the server.

Any advice is appreciated.
--
Please give a hearty thumbs up to any post you find helpful!
To find articles by Craig Wilson simply follow the link: Craig Wilson's Tips!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Download Image from Windows Server for WinPE Imaging

ecmastrean;2486623 wrote:
We are on ZCM 2017 Update 2a and all of our primary and satellites are Linux to last week I brought a Windows 10 server online and promoted it to the satellite role so I could test WinPE imaging using a server instead of a flash drive to host the images. The Windows satellite only has the imaging role assigned to it and I made sure the winpe.wim and imagex.exe 32 and 64 bit files synched to the server as well as the Tuxera driver. So if I build a preboot bundle with an action of ZENworks Imge and I enter the Windows server IP and path to the image file for example:
XXX.XXX.3.9
C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg

If I assign this bundle to a computer it copies the image fine. But when I use a third party script I get an error saying the image path is invalid. Here is the code:

$PROXYADDR='XXX.XXX.3.9'
...
Write-Host "Restoring Image..."
img -restorep "C:\Program Files (x86)\Novell\ZENworks\work\content-repo\images\1709WinPE.zmg" -ip=$PROXYADDR
Write-Host "Restoring Addons..."
img -rp \images\1709addons.zmg -ip=$PROXYADDR -ap=a1:p3
Write-Host "Restoring Drivers..."
img -rp \images\$drivers -ip=$PROXYADDR -ap=a1:p3

The first img command gives the image path is invalid while the last two give an error invalid physical partition specified. This makes sense since the partitions are not written until 1709WinPE.zmg is copied. I tried img -rp, -restorep and I have also set the path to \images\1709WinPE.zmg and \\ASC-WIN2016\content-repo\images\1709WinPE.zmg. On the server itself I have shared the images folder and gave everyone full rights to it. Yet after all this I still get the error. One thing I do notice is that another primary is being used to copy the winpe.wim file to the computer and initiate the third party imaging script. Only in the script do I specifically set the Windows imaging server IP. So my questions are:

1. Why can the 1709WinPE.zmg file download fine to a computer using a preboot bundle but not a third party imaging script?

2. How do you set a preferred imaging server to an OU? My guess is because another imaging server is doing the work, there are permission issues when the third-party script tries to access the server.

Any advice is appreciated.


Hi,

You dont need to specify the full path of the image in the img command. It by default looks in the "content-repo\images" folder. All the paths you specify must be relative to the "images" folder.

So the following command should do the job:
img -rp 1709WinPE.zmg -ip=$PROXYADDR

The same applies to other commands.

(-rp is a short version of -restorep)
0 Likes
Highlighted
Visitor.

Re: Download Image from Windows Server for WinPE Imaging

Thank you both for your replies, they helped me resolve the problem. Since Craig mentioned that the IMG command uses TFTP, not a share, I realized I did not need to store the imaging files on a Windows server but they could reside on the Linux server I was imaging from. I was under the impression that I needed to use a Windows server to host the WinPE image files. That would be the case if I was imaging using bundles, but we are using a third-party script. In addition to this, I could not find where to set the Windows server as the imaging server for our location therefore imaging was done by the Linux server instead. If I could have imaged from the Windows server then full paths and IP's would not be necessary. The problem came when I was imaging from a Linux server and trying to TFTP into a Windows server to get the files. So I changed the script and copied the .zmg files to the Linux server and now the script works. I appreciate the clarification. Here is the working script:

IMGSVR=$PROXYADDR
...
Write-Host "Restoring Image..."
img -rp 1709WinPE.zmg
Write-Host "Restoring Addons..."
img -rp 1709addon.zmg -ap=a4:p3
Write-Host "Restoring Drivers..."
img -rp $drivers -ap=a4:p3
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.