Deploying 32 bit and 64 bit OS using 32 bit WinPE in the same Task Sequence
So I am looking to validate my thoughts deploying a Windows 7 Enterprise 64-bit Operating System image using a 32 bit Boot Image. I read on the forum thread (http://social.technet.microsoft.com/Forums/en/configmgrosd/thread/7719ac39-cade-4b8c-a1d4-e3e394742997) that: You can deploy an x64 operating system from a 32-bit WinPE. This combination allows you to use a 32-bit WinPE, run various hardware tools (such as doing BIOS configuration, configuring a RAID controller, etc.) as task sequence actions, and still deploy an x64 operating system. and some more from here (http://social.technet.microsoft.com/Forums/en-US/configmgrosd/thread/1b1a095b-5bd7-41d9-82fe-a6d4ffc748d4/) that: For deploying OS Images (not OS install packages), there is no need for more than one 32-bit bit boot image. 64-bit boot images are needed for the PSP (ConfigMgr extract the netboot files from it), but not for actuall deployment. The 32-bit boot image can deploy both 32-bit and 64-bit OS Images. The only time you need to start a 64-bit boot image is when using OS Install Packages, e.g. when creating a 64-bit reference image using ConfigMgr. So I am looking to simplify task sequences and I would like to possibly deploy both 32 bit and 64 bit images using the same Task Sequence. We are currently using WMI queries to determine which driver packages to deploy for different model computers, but we still have separate Task Sequences for 32 vs 64 bit images. From what I have been reading it seems as though I would not need to do that. I would just need to set my task sequences to use a 32 bit WinPE boot image, ensuring I have the proper network drivers for all models. If I could check that a computer has at least 2 GB of memory I could have that as a 64 bit image and less than 2 GB as a 32 bit image. The software steps can easily check what OS type is installed once the OS in installed and deploy software accordingly. 1. First, is everything I said so far accurate? 2. Second, how can I determine the amount of RAM the computer has and translate that to whether an image installs or not? 2.a. I see a Validate step available in the MDT, but I not sure how i can leverage that to set a variable or determine which image to do. 2.b. Can a WMI query pull the HARDWARE RAM information? 3. Suggestions as to how to reduce my number of Task Sequences and build more features into one task while staying flexible (vague question I know)? Thanks in advance.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
June 27th, 2012 1:07pm

It's an accurate theory as long as you are using non-uefi devices. For the WMI query you can look at either TotalPhysicalMemory in Win32_ComputerSystem (http://msdn.microsoft.com/en-us/library/windows/desktop/aa394102(v=vs.85).aspx), or at Capacity in Win32_PhysicalMemory (http://msdn.microsoft.com/en-us/library/windows/desktop/aa394347(v=vs.85).aspx).My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2012 4:25pm

You can use the same X86 boot image (as long as the right NIC driver is injected) to boot up WinPE for deploying both X86 & X64 OS image. I'm trying to do the same thing with your approach. Automate everything in one single task sequence. All I need to do are: - Finding a way to automate configuring Boot order in pre-OS environment (for PXE boot of unknown computers). - Building scripts using wmi: + Writing a script to verify RAM in BIOS in order to redirect to correct OS image (X86 or X64). + Find which task sequence variable is used to set to OS image (X86 or X64). Guide from microsoft http://technet.microsoft.com/en-us/library/dd252753.aspx does not review which variable to set the image. Command line in Apply OS Image is: Action command line: OSDApplyOS.exe /image:VNG00198,%OSDImageIndex% ; there is no variable to set to VNG00198 :-s + Write a script to read the enclosure & chasis --> redirect correct driver package. (don't know which variable to set driver package too) I don't use MDT. Hope to companion with you to share each other the way to achieve this :) Vic
June 27th, 2012 11:05pm

For the WMI query you can look at either TotalPhysicalMemory in Win32_ComputerSystem (http://msdn.microsoft.com/en-us/library/windows/desktop/aa394102(v=vs.85).aspx), or at Capacity in Win32_PhysicalMemory (http://msdn.microsoft.com/en-us/library/windows/desktop/aa394347(v=vs.85).aspx). TotalPhysicalMemory seems like it should work. However I notice it only reports what is available to the Operating System. We have a number of computers with shared video memory. So for example the results of "WMIC ComputerSystem GET TotalPhysicalMemory" is "1875591168" instead of the expected "2147483648" (2 GB). So to compensate I will try using the following for 32 bit: Select * from Win32_ComputerSystem WHERE TotalPhysicalMemory < 1500000000 64 bit: Select * from Win32_ComputerSystem WHERE TotalPhysicalMemory > 1500000000 I don't really like this since the numbers are not actually verifying that the machine does have 2 GB of RAM installed. I looked at the Capacity one also, but I am not sure how to make use of this one. This gives the size of each of the DIMMS installed, but I don't know how to extract just the size and then combine them to give the sum of all the RAM DIMMS.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2012 4:22pm

Yes this is accurate. I have previously deployed both 32 and 64 bit images from the same task sequence but used a WMI query to find out if the processor was 64 bit capable. More info http://blog.danovich.com.au/2010/03/27/simple-query-to-find-if-processor-is-64-bit-capable/ and http://blog.danovich.com.au/2011/04/08/x86-or-x64-boot-images-during-sccm-os-deployment/My Microsoft Core Infrastructure & Systems Management blog - blog.danovich.com.au
July 3rd, 2012 1:19am

I found a way to do this using PowerShell, "(Get-WMIObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum" but I don't know how to use PowerShell in a Task Sequence without researching. Is there a way to sum the results of the WMI query for Capacity so that I can have the actual amount of RAM installed in the machine and not just what is presented to the operating system?Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 5:55am

Yes this is accurate. I have previously deployed both 32 and 64 bit images from the same task sequence but used a WMI query to find out if the processor was 64 bit capable. More info http://blog.danovich.com.au/2010/03/27/simple-query-to-find-if-processor-is-64-bit-capable/ and http://blog.danovich.com.au/2011/04/08/x86-or-x64-boot-images-during-sccm-os-deployment/ The table of the boot images and what types of OSD are supported was nice to see in graphical form. Thanks. Your suggestion regarding the CPU type won't help me as ALL of our computer processors are 64 bit architecture, as I believe processors have been for years, but not all of them have the 2GB of RAM requirement to run 64 bit OS properly.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
July 3rd, 2012 6:05am

Yes this is accurate. I have previously deployed both 32 and 64 bit images from the same task sequence but used a WMI query to find out if the processor was 64 bit capable. More info http://blog.danovich.com.au/2010/03/27/simple-query-to-find-if-processor-is-64-bit-capable/ and http://blog.danovich.com.au/2011/04/08/x86-or-x64-boot-images-during-sccm-os-deployment/ The table of the boot images and what types of OSD are supported was nice to see in graphical form. Thanks. Your suggestion regarding the CPU type won't help me as ALL of our computer processors are 64 bit architecture, as I believe processors have been for years, but not all of them have the 2GB of RAM requirement to run 64 bit OS properly. Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches. Chase is correct. Most processors in recent years are 64-bit capable so that doesnt really help at all since 99.9% of the time the results will be a 'yes' for x64, no matter the value of the RAM. Just validating Chase's comment. I dont actually have anything to add for the ammount of memory on the computer....
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 7:47am

I lied, could you use the WMI object for memphysical? wmic memphysical get maxcapacity My PC I am currently using shows 33554432, so 3 gigs roughly. Using the "wmic memorychip get *" I can see both slots being used, each having 2 gig chips in it (32 bit system). This does not appear to be showing the video memory as part of the maxcapacity.
July 3rd, 2012 7:55am

I lied, could you use the WMI object for memphysical? wmic memphysical get maxcapacity My PC I am currently using shows 33554432, so 3 gigs roughly. Using the "wmic memorychip get *" I can see both slots being used, each having 2 gig chips in it (32 bit system). This does not appear to be showing the video memory as part of the maxcapacity. I don't know what the MaxCapacity value is actually giving me. It does not appear to be what I would suspect as it says: C:\>wmic memphysical get maxcapacity MaxCapacity 4194304 All while my computer has 6 GB (3 x 2GB). This is shown by: C:\>wmic memorychip get Capacity Capacity 2147483648 2147483648 2147483648 What I need is a way to combine the 3 values above in the query to give me a total of "6442450944" (6 GB). I found how to do this using PowerShell, "(Get-WMIObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum". But I don't know how to do this in WMI. Then I can have a query something like: 32 bit: Select * from Win32_PhysicalMemory WHERE <the_sum_of_capacity_dimms> < 2147483648Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 10:57am

What is the OS and 32/64? It is possible if Windows 7 x86 then it would show your MaxCapacity as 4194304 instead of the 6GB. On my VM Host (Windows 7 x64) when I run the "wmic memphysical get maxcapacity" it says 8388608 (8 GB). So by chance are you doing this on a 32 bit system? Which would lead to questions about the WinPE x86 boot image. It may only address up to 4 gigs too. Also that is giving you the kilobyte of the memory. So the math would be : 4194304/1048576 = 4 GB http://www.csgnetwork.com/memconv.html That link makes it easy to convert. Enter your value into the Kilobytes and it will give you the number for memory. If you Enter 8388608 in there it will give 8. Edit : This will give you the value, just copy/paste into notepad and name the file <somthing>.vbs and double click it. strComputer = "." Set ObjWMIService = GetObject("winmgmts:\\"& strComputer &"\root\cimv2") Set colMemory = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colMemory wscript.echo "Memory : " & objItem.MaxCapacity /1048576 Next This will divide the number (in your case) 4194304 by 1048576 and should just echo you "Memory : 4". If that works for you then make your If > <number> else..... and so on. One more thing, doing this on a VM host seems to give max 256 gigs, so do this on a physical machine. Here is the if/then statement with that : strComputer = "." Set ObjWMIService = GetObject("winmgmts:\\"& strComputer &"\root\cimv2") Set colMemory = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colMemory wscript.echo "Memory : " & objItem.MaxCapacity /1048576 If objItem.MaxCapacity /1048576 > 4 Then 'Change the 4 to whatever your determining factor is wscript.echo "x64" Else wscript.echo "x86" End If Next
July 3rd, 2012 11:11am

I am running Windows 7 x64 Enterprise. Neither of those gave me a higher value. I tried at cmd.exe and 64 bit PowerShell in case cmd.exe was running 32 bit. As for the VBS scripts they returned the same number and was not correct. Additionally, I would see how to run them as a part of a task and have the data feed back to the task sequence. As a side note, the following method is working, but does not give the actual amount of RAM your have installed in the motherboard slots. Rather it seems to give something more like what is left after the shared video memory. So I am not able to use the correct values I would like for comparison. 32 bit: Select * from Win32_ComputerSystem WHERE TotalPhysicalMemory < 1500000000 64 bit: Select * from Win32_ComputerSystem WHERE TotalPhysicalMemory > 1500000000 Any other WMI classes, queries, whatever you want to call them, that would get me the actual amount of RAM in the machine?Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 2:12pm

If you've got the value via Powershell already, you can pass it back to the Task Sequence as a variable. See here for a good explanation of Powershell and Task Sequence (variables): http://blogs.technet.com/b/mniehaus/archive/2009/09/22/running-powershell-scripts-as-part-of-a-task-sequence.aspxMy Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
July 3rd, 2012 3:16pm

If you've got the value via Powershell already, you can pass it back to the Task Sequence as a variable. See here for a good explanation of Powershell and Task Sequence (variables): http://blogs.technet.com/b/mniehaus/archive/2009/09/22/running-powershell-scripts-as-part-of-a-task-sequence.aspx As it happens I already had that page open in another tab, just trying to find time to try and understand it. Glad to hear you think it may do the trick. I will try and check it out over the holiday and Thursday as well. Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 4:11pm

It will definitely work :-) Simply because you get the value back in the Task Sequence as a variable, which means you can do pretty much everything with it.My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
July 3rd, 2012 4:20pm

It will definitely work :-) Simply because you get the value back in the Task Sequence as a variable, which means you can do pretty much everything with it. This is my PowerShell: (Get-WMIObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum or ((Get-WMIObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum)/1GB It returns for my 6 GB (3 x 2 GB): 6442450944 or 6 respectivly. Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 4:41pm

Another thought, back to "2.a." of my original post...can I leverage the MDT Validate step to just steal a variable from there? I see they have a Memory check in the Validate step. Would this avoid me trying to do what I am doing with WMI and PowerShell? I am still going to look into the other PowerShell in TS stuff, but no one had commented on the MDT Validate step yet.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
July 3rd, 2012 4:44pm

The MDT Validate step checks the minimum spec you specify against what has been pulled down during the MDT gather step. So when MDT gather runs, it runs a bunch of WMI against the machine and stores the values in TS variables, probably easiest if you look at the ZTIGather.wsf in your MDT script repository. But heres a list of info it pulls and the TS variablse it sets; oEnvironment.Item("AssetTag") = sAssetTag oEnvironment.Item("SerialNumber") = sSerialNumber oEnvironment.Item("Make") = sMake oEnvironment.Item("Model") = sModel oEnvironment.Item("Product") = sProduct oEnvironment.Item("UUID") = sUUID oEnvironment.Item("Memory") = sMemory oEnvironment.Item("Architecture") = sArchitecture oEnvironment.Item("ProcessorSpeed") = sProcessorSpeed oEnvironment.Item("CapableArchitecture") = sCapableArchitecture oEnvironment.Item("IsLaptop") = ConvertBooleanToString(bIsLaptop) oEnvironment.Item("IsDesktop") = ConvertBooleanToString(bIsDesktop) oEnvironment.Item("IsServer") = ConvertBooleanToString(bIsServer) It calculates the the installed memory by looking at Win32_ComputerSystem.TotalPhysicalMemory/1024. Coming back to you using the MDT validate step, this probably wont work for you as if you configure the minimum spec to be > 2gb memory then anything with less than 2gb memory will not meet the required criteria and end the task. you would need to put a condition on the validate task which just puts you back at square one. If you are integrating MDT, then run the Gather step, and then put a condition on your OS task that checks the Memory variable (defined by the Gather script) is greater than 2gb for x64 and < than for x86. If you rather just use powershell then try $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $memory = ((Get-WMIObject -Class Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum)/1GB $tsenv.Value("Memory") = "$memory" This will also set a TS variable called Memory which you can set conditions against (if your still using MDT I'd change the variable name to something else so it doesnt get overwritten by MDT. If you just want to directly set a x64capable true/false variable you could add the following If($memory -gt 2){ $tsenv.Value("x64capable") = "True"} Else { $tsenv.Value("x64capable") = "False" } then set a TS condition to x64capable ture or false as required. To run the script, add it to a package and use the following command line cmd /c powershell.exe -executionpolicy Bypass -NoProfile -noninteractive -file .\scriptname.ps1 but otherwise everything else your planning on doing should work. Im using the same thing, one TS, uses 32bit boot wim, deploys both x64 and x32 OS based on a variable, driver packages are applied with wmi TS conditions checking make, model and OS arch. The rest is just software which is mostly the same across both OS's. Generally everything else is fairly simple with wmi conditions set against the OS or TS variables. hope this helps
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 2:15am

WinPe can't run PowerShell scripts. You just can write vbscript which will create task sequence variable and return to this variable total memory size. After it you can use this variable and compare the variable in OSD steps. Here is an example: Set oTaskSequence = CreateObject("Microsoft.SMS.TSEnvironment") Set oWMIcimv2 = GetObject("winmgmts:root\cimv2") iTotalMem = 0 For Each oMemBank in oWMIcimv2.execquery("select * from win32_physicalmemory") iTotalMem = iTotalMem + oMemBank.Capacity Next oTaskSequence("OSDTotalPhysicalMemory") = iTotalMem I not tested it in OSD, but I think it will be work. This script will create TSVariable with name OSDTotalPhysicaMemory. http://technet.microsoft.com/en-us/library/bb693541.aspx If you want to detect x64 cpu architecture, you can use this query: Select * From Win32_Processor where Architecture = 9 For x86 processors "architecture" value equal 0. http://msdn.microsoft.com/en-us/library/windows/desktop/aa394373(v=vs.85).aspx
July 4th, 2012 6:20am

WinPe can't run PowerShell scripts. You just can write vbscript which will create task sequence variable and return to this variable total memory size. After it you can use this variable and compare the variable in OSD steps. Here is an example: Set oTaskSequence = CreateObject("Microsoft.SMS.TSEnvironment") Set oWMIcimv2 = GetObject("winmgmts:root\cimv2") iTotalMem = 0 For Each oMemBank in oWMIcimv2.execquery("select * from win32_physicalmemory") iTotalMem = iTotalMem + oMemBank.Capacity Next oTaskSequence("OSDTotalPhysicalMemory") = iTotalMem I not tested it in OSD, but I think it will be work. This script will create TSVariable with name OSDTotalPhysicaMemory. http://technet.microsoft.com/en-us/library/bb693541.aspx If you want to detect x64 cpu architecture, you can use this query: Select * From Win32_Processor where Architecture = 9 For x86 processors "architecture" value equal 0. http://msdn.microsoft.com/en-us/library/windows/desktop/aa394373(v=vs.85).aspx
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 6:21am

@pirate8216: That is great! Awesome information and examples which I appreciate. I have gotten a PowerShell script together which I am looking to test out. I'll come back here with results and then mark things accordingly. Thanks.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
July 9th, 2012 2:08pm

I am getting an error: 'powershell.exe' is not recognized as an internal or external command, InstallSoftware 7/9/2012 2:26:11 PM 1492 (0x05D4) bobgreen84 says PowerShell does not work in WinPE. I am wondering if all the PowerShell scripts that are being demonstrated in blogs like this one that they are being done AFTER the task sequence has rebooted and started actually running Windows 7. Along the same lines of where you would be installing software applications after the OS is applied. Thoughts? Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 3:50pm

Sorry, I got a bit ahead of myself. bobgreen84 was right, powershell isnt supported in WinPE (though i think this changes with WinPE for Win8). You can run the VB code bobgreen84 posted, or use the existing MDT variables. Yeah, you can run the Powershell scripts once you have the OS deployed.
July 10th, 2012 2:13am

@bobgreen84 your script worked beautifully! I have made a few modifications: added an IF statement to so I could set a True False variable for 64 bit compatibilityadded extra variables just in case I ever have a use for them I don't have to change anything Here is my modified code: Set oTaskSequence = CreateObject("Microsoft.SMS.TSEnvironment") Set oWMIcimv2 = GetObject("winmgmts:root\cimv2") iTotalMemB = 0 iTotalMemKB = 0 iTotalMemMB = 0 iTotalMemGB = 0 For Each oMemBank in oWMIcimv2.execquery("select * from win32_physicalmemory") iTotalMemB = iTotalMemB + oMemBank.Capacity Next iTotalMemKB = iTotalMemB / 1024 iTotalMemMB = iTotalMemKB / 1024 iTotalMemGB = iTotalMemMB / 1024 If iTotalMemGB < 2 Then sX64Capable = "False" Else sX64Capable = "True" End If oTaskSequence("OSDMemoryInBytes") = iTotalMemB oTaskSequence("OSDMemoryInKB") = iTotalMemKB oTaskSequence("OSDMemoryInMB") = iTotalMemMB oTaskSequence("OSDMemoryInGB") = iTotalMemGB oTaskSequence("OSDx64Capable") = sX64Capable I then created a "Run Command Line" step with the package I made selected the the command line "cscript PhysicalMemory.vbs". My variables were then available for use. Thanks so much for the help everyone! Can't wait for the PowerShell support in the new WinPE.Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2012 11:19am

Powershell is very poor in WinPe :( Only 15-20 basic cmdlets are available.
July 12th, 2012 5:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics