Windows 7 SteadyState Solution updated!

Discussion Windows 7 SteadyState Solution updated!

  • 2011年7月7日 下午 06:55
     
     
    Hi all,

    I have updated my Windows 7 SteadyState solution based on differencing VHDs and the "Boot from VHD" feature.

    The updated solution is now fully automated based on scripts, MDT and WAIK.

    You simply run a setup file which creates a bootable ISO which, in turn, can be used to fully deploy Windows 7 in a "SteadyState" condition.

    The solution is simple to install, clean and highly customizable.

    Downloads and a step-by-step guide can be found at my blog here: http://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx

    Looking forward to getting feedback from the SteadyState community.

    Panos Macheras
    Microsoft Infrastructure Consultant



所有回覆

  • 2011年7月11日 上午 02:48
     
     

    Thanks for this, but I get an error every time!

     

    Line 37 (File "c:\Steadystate\setup.exe"):

    Error: Subscrip used with non-Array variable.

     

    Please help!?

     

     

  • 2011年7月11日 上午 06:14
     
     

    First of all, thanks for trying the solution!

     

    When you get this message, please verify that the following file exists:

    c:\DeploymentShare\Control\OperatingSystems.xml

     

    If it does, post its contents here to investigate further.

     

    Thanks,

    Panos.

     

     

  • 2011年7月11日 下午 09:37
     
     

    Hi Panos,

     

    Yes the file exists, but it is empty

     

    Thanks

    Brendan

  • 2011年7月11日 下午 09:47
     
     

    Hi Brendan,

    This probably means that the OS import failed for some reason.

    Did you copy-pasted the Windows 7 DVD media to the WIN7CD folder (as described in Step 4)?

    You should have something like this:

    http://blogs.technet.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8712.image_5F00_47F231D4.png

    Please verify this and let me know.

    Thanks,

    Panos.

  • 2011年7月11日 下午 10:06
     
     

    Yes, I sure did, and the folder structure is the same as the linked image
  • 2011年7月11日 下午 10:09
     
     
    I am using Win7 with SP1, would this be an issue?
  • 2011年7月11日 下午 10:41
     
     

    Win7 with SP1 should work just fine (I have tried it).

    For some reason the import of the OS files is failing. 

    We need to have the output of the powershell script that does the import (ImportOS.ps1).

     

    Re-run the procedure and when you get the error go and right-click the ImportOS.ps1 file and select "Edit".

    This should take you to powershell_ise (the IDE for Powershell in Win7).

    Select "File" -> "Run".

    You should be able to see the output of the command. Please provide this for further investigation.

     

    Thanks.

    Panos.

  • 2011年7月11日 下午 10:54
     
     

    when running through powershell_ise i get

    PS C:\SteadyState> C:\SteadyState\ImportOS.ps1
    File C:\SteadyState\ImportOS.ps1 cannot be loaded. The file C:\SteadyState\ImportOS.ps1 is not digitally signed. The script will not execute on the system. Please see "get-
    help about_signing" for more details..
    At line:0 char:0

     

    But if i do a copy paste into Powershell, i get

    PS C:\Windows\system32> Import-mdtoperatingsystem -path "DS001:\Operating Systems" -SourcePath ".\WIN7CD" -DestinationFo
    lder "Windows 7" -Verbose
    Import-MDTOperatingSystem : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path 'DS
    001:\Operating Systems' because it does not exist."
    At line:1 char:32
    + Import-mdtoperatingsystem -path <<<<  "DS001:\Operating Systems" -SourcePath ".\WIN7CD" -DestinationFolder "Windows 7
    " -Verbose
        + CategoryInfo          : WriteError: (:) [Import-MDTOperatingSystem], ParameterBindingException
        + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.BDD.PSSnapIn.ImportOperatingSystem


  • 2011年7月11日 下午 11:10
     
     

    So what I have done is opened each .ps1 script, made a change and reversed it and resaved.

    This seems to have got around the signing issue and it looks like it is running. (i had to do it for each file)

     

    Thanks for your help. im not sure if anyone else will have the same issue, but its a fairly quick fix


  • 2011年7月11日 下午 11:11
     
     

    Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

  • 2011年7月11日 下午 11:17
     
     

    So what I have done is opened each .ps1 script, made a change and reversed it and resaved.

    This seems to have got around the signing issue and it looks like it is running. (i had to do it for each file)

     

    Thanks for your help. im not sure if anyone else will have the same issue, but its a fairly quick fix


    Please see my post about the "set-executionpolicy" command.

    It seems that for some reason the execution policy in Powershell was not set by the script (setup.exe should do this automatically).

    I will update the blog post to recommend a manual run of the "set-exeutionpolicy remotesigned" command (which is the one needed to run "unsigned" powershell script like the ones I am having in the solution). This will hopefully mitigate the issue once and for all.

    Panos.

  • 2011年7月11日 下午 11:33
     
     

    Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

    This is what i tried first, and it didn't work. So I tried the editing...
  • 2011年7月11日 下午 11:42
     
     

    Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

    This is what i tried first, and it didn't work. So I tried the editing...

    Then maybe "set-executionpolicy unrestricted" could do the trick.

    Panos.

  • 2011年7月15日 上午 08:32
     
     

    Hi all,

    I have updated my Windows 7 SteadyState solution based on differencing VHDs and the "Boot from VHD" feature.

    The updated solution is now fully automated based on scripts, MDT and WAIK.

    You simply run a setup file which creates a bootable ISO which, in turn, can be used to fully deploy Windows 7 in a "SteadyState" condition.

    The solution is simple to install, clean and highly customizable.

    Downloads and a step-by-step guide can be found at my blog here: http://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx

    Looking forward to getting feedback from the SteadyState community.

    Panos Macheras
    Microsoft Infrastructure Consultant



    Two important notes have been added to the Blog Post:

    1. One is which specific media will work with the solution. Only Windows 7 Ultimate and Windows 7 Enterprise editions will work (x64 or x86). Other editions or multi-editions DVDs (media which included all editions of Win7) will NOT work.

    2. Added note about Powershell set-executionpolicy.

    Panos.

  • 2011年8月25日 下午 06:59
     
     

    I am seeing the same error message: Line 37 (File "c:\SteadyState\setup.exe").  I too checked the OperatingSystems.xml and it was empty.  I check the ImportOS.ps1 and it stated that ImportOS.ps1 is not digitally signed.  I ran all the commands in powershell:  set-executionpolicy remotesigned, set-executionpolicy unrestricted and set-executionpolicy allsigned.  Nothing helped....still the same Line 37 error message.

    Brian

     

     

  • 2011年8月26日 上午 07:01
     
     

    Hi Brian,

    In case you are still having problems with *.ps1 files not being digitally signed then try opening them for edit (in the built-in powershell editor or in notepad), adding something redundant (like a space character which you immediately delete) and then saving them. This will propably fix the problem with their digital signatures.

    Not sure why this is caused on some systems while on others it is working fine.

    On a relevant note I hope to start working soon on an updated installer which will be a true "setup.exe" experience (i.e. a "real" program) and be done with powershell and scripting altogether.

    Panos

  • 2011年9月8日 上午 08:28
     
     

    Hi!

    Can I use Your solution with already installed windows 7? I finished installing our computer lab and I don't want to start over. I saw I can capture the active system to a vhd.  Is this vhd usable with your method? Or any guidelines how I can achieve this functionality (reboot all changes lost, except the If i want to save them)?

    Thanks in advance!

    Zsolt

  • 2011年12月26日 上午 04:30
     
     

    Thank you for the detailed walkthrough.  However, I have created the ISO four times now, using different media (Win7 Ultimate Ultimate SP1), but receive the following error each time:

    Deployment Summary: Operating system deployment did not complete successfully... 1 error and two warnings.

    File E:\Deploy\Sontrol\STEADYSTATE\TS.xml Line: 4 - End tag 'os' does not match the start tag 'variable'

    Litetouch deployment failed, Return Code = -2147467259 0x80004005

    Line 4 of TS.xml is as follows:

        <variable name="OSGUID" property="OSGUID">{018777c3-0ac2-4a3b-a1c9-8e17c03cf3ac}" enable="True"><Name>Windows 7 STARTER in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 STARTER</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>1</ImageIndex><ImageName>Windows 7 STARTER</ImageName><Flags>Starter</Flags><HAL>acpiapic</HAL><Size>7700</Size><Language>en-US</Language></os><os guid="{ad315ebc-caa3-4f97-bf86-73c25c13d6e2}" enable="True"><Name>Windows 7 HOMEBASIC in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 HOMEBASIC</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>2</ImageIndex><ImageName>Windows 7 HOMEBASIC</ImageName><Flags>HomeBasic</Flags><HAL>acpiapic</HAL><Size>7751</Size><Language>en-US</Language></os><os guid="{af26789d-73ac-45ef-8a8e-1343ac2dd56b}" enable="True"><Name>Windows 7 HOMEPREMIUM in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 HOMEPREMIUM</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>3</ImageIndex><ImageName>Windows 7 HOMEPREMIUM</ImageName><Flags>HomePremium</Flags><HAL>acpiapic</HAL><Size>8172</Size><Language>en-US</Language></os><os guid="{4b2871ac-6804-46fa-84ed-658a3d8634be}" enable="True"><Name>Windows 7 PROFESSIONAL in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 PROFESSIONAL</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>4</ImageIndex><ImageName>Windows 7 PROFESSIONAL</ImageName><Flags>Professional</Flags><HAL>acpiapic</HAL><Size>8058</Size><Language>en-US</Language></os><os guid="{af9de1c9-7e34-4cbb-81ae-62c2c9400197}</variable>

    Can you throw any light, please?

     

  • 2012年4月11日 下午 04:54
     
     
    You need to remove all clg fiiles in the sources folder that are from anything other than Ulitimate or Enterprise versions. You also need to remove all index entries from the install.wim file leaving only Ulitimate or Enterprise. Google gimagex and you can use this to remove the index's. - Been there felt that. BritTech