SCCM 2012 R2 Tasksequence for VDI Master Image

Hi
I'm currently building a ConfigMgr Tasksequence for a RDS VDI solution. At the end of the TS I have a PowerShell Script which prepares the SCCM Client for the master image (delete certs, remove provisioning mode). I would like to use the variable
SMSTSPostAction for doing the sysprep with a shutdown. But the  machine hangs after rebooting out from the PS Script. Of course the Agent is no longer available but the SMSTSPost Action Variable should start.
Does anyone have an idea?
I need to use SCCM as MDT is not an option.

I fixed this by myself using powershell.
At the end of the TS I copy a PS Script to the sysprep folder. This script is running as SMSTSPostAction and does the following:
# Step 1 -Prepare SCCM Client for VDI Deployment
Get-Service -displayname "SMS Agent Host" | stop-service -Force
Remove-Item -Path C:\Windows\SMSCFG.INI -force
Get-childitem -Path cert:\localmachine\sms -DnsName *SMS* | Remove-Item
Invoke-WmiMethod -Namespace root\CCM -Class SMS_Client -Name SetClientProvisioningMode -ArgumentList $false
Clear-Host
Write-Host "Please do not use the VM. SMSTSPostAction is still running!" -foregroundcolor Green
Write-Host "Waiting several seconds until Sysprep..." -foregroundcolor Green
Start-Sleep -s 60
# Step 2 - Sysprep & Shutdown
C:\Windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown
The Maschine reboots at the end of the TS with a success code and runs then the SMSTSPostAction. The SCCM Agent is then well prepared for cloning. Make sure you have set your execution policy right.

Similar Messages

  • "Enable distribution-point sharing for this source site" did not showing SCCM 2007 DPs as SCCM 2012 content shares for CM12 clients

    Hi
    We have one central site server and three primary site servers in SCCM 2007 and completed the SCCM 2012 migration as single hierarchy.
    During the migration, We have configured SCCM 2007 Central site server as source hierarchy for data gathering process and configured the "Enable distribution-point sharing for this source site" to make SCCM 2007 distribution points
    as SCCM 2012 content shares to serve SCCM 2012 migrated clients. Now we are facing a problem that one of the primary site server's data gathering process did not gather SCCM 2007 DPs even though we configured "Enable distribution-point sharing for this
    source site" but data gathering process is completing successfully.
    Is anyone have idea, why these SCCM 2007 DPs did not appearing as SCCM 2012 content shares under "Shared Distribution Points"
    Thanks in Advance
    srkr

     Now we are facing a problem that one of the primary site server's data gathering process did not gather SCCM 2007 DPs even though we configured "Enable distribution-point sharing for this source
    site" but data gathering process is completing successfully.
    Earlier all the shared DPs are showing under  Shared Distribution Points ? Or since starting itself these DPs are not showing down? Have you checked migmctrl.log for some clue?
    Anoop C Nair (My Blog www.AnoopCNair.com)
    - Twitter @anoopmannur -
    FaceBook Forum For SCCM

  • SCCM 2012 - Network requirements for Client communication to primary in a Cross Forest Environment

    Hello, I have been trying to get some definitive answers on what network traffic is required between a client and a primary site versus a secondary in a cross forest scenario.
    Here is the scenario:
    Company A has an existing SCCM 2012 primary Site. Company B (Separate Forest) has now been brought in. One subnet on each side can route to each other and using that one subnet a two way forest
    trust has been setup. But the remote offices have IP address overlaps between companies. At some point in the future all assets on company B will be re-IP and brought over to Company A domain. But in the interim it would be nice to get SCCM cross forest clients
    working. Upgrading to a CAS model with two Primaries would not be preferred here as this is a temporary solution. 
    My questions are as follows.
    If a secondary site is deployed into Company B Forest/Network. I have seen people online elude to that clients will still need to communicate to the Primary located at Company A, even though they
    are assigned to a secondary on Company B’s network. Is this true? Is there any workarounds for this? Is a NAT back to the primary acceptable, or is reverse lookup required?
    Will the Primary need to communicate directly to the clients in Company B? If this is in fact a requirement, then this would be a show stopper. But if its only needed for things like client pushes,
    then we could work around it.
    Thanks

    "But the remote offices have IP address overlaps between companies"
    Technically, this is unsupported because clients, depending upon your boundaries, will not be able to find a local DP since they use IP addresses for this. The only way to work around this is to use AD Site boundaries.
    "though they are assigned to a secondary"
    Clients are *never* assigned to a secondary site -- that's not what secondary sites are for. Yes, clients require communication with an MP in the primary site where they are assigned. There is no way to change this or work-around this except to put
    an MP from the primary site closer to those clients and use the new MP affinity option in R2 CU3.
    Reverse lookups are only used to verify names by applications that wish to have this type of functionality (which are very few in number) and have nothing to do with true network traffic. NATing is an issue for the reason I gave above -- DP location.
    Remote control, client push, and WoL won't work either because there is no way for the traffic to reach the destination behind the NAT.
    All client *agent* communication in ConfigMgr is client initiated in ConfigMgr (remote control, client push, and WoL -- as just mentioned -- are sort of exceptions to this but they don't really involve the client *agent*.)
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • SCCM 2012 R2 IP for Orchestrator 2012

    Hi,
    We have Orchestrator 2012 (7.0.1154.0) installed, and I would like to connect it to our SCCM 2012 R2 (5.0.7958.1303) installation with an integration pack.
    Does anyone know if I can connect a non-R2 Orchestrator to an R2 SCCM and if so, which IP I should use.
    I wish I could upgrade my SC'Orch to R2 but sadly we have some old SharePoint 2007 third-party IP's which do not work with R2, so I don't think that is an option.
    Your advice will be greatly appreciated.
    Tom

    Hi,
    you can register and deploy the System Center2012 R2 Integration Pack for SCCM, available here: http://www.microsoft.com/en-us/download/details.aspx?id=39622&WT.mc
    System Center 2012 Service Pack 1 - Orchestrator Component Add-ons and Extensions are available here:
    http://www.microsoft.com/en-us/download/details.aspx?id=34611
    Regards,
    Stefan
    www.sc-orchestrator.eu ,
    Blog sc-orchestrator.eu

  • Does sccm 2012 supports ibcm for linux and unix operating systems

    folks,
    does SCCM 2012 supports linux and unix operating system for IBCM ..........as per my knowledge it dont what i have learn t through bing........

    I thought it's not supported for Linux and Unix, see also:
    http://blogs.msdn.com/b/teju_shyamsundar/archive/2014/05/23/installing-the-system-center-2012-r2-configuration-manager-client-on-linux-part-2.aspx
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Sccm 2012 collection query for software deployment failed PCs

    Hi,
    Let me know how can we create a collection of PCs which a particular advertisement failed.
    SCCM 2012 sp1 infra
    Midhun.PS

    See
    http://myitforum.com/cs2/blogs/gramsey/archive/2006/10/20/How-To_3A00_-Create-a-Collection-Based-on-an-Advertisement-Status.aspx. This will only work for program deployments, not applications.
    Torsten Meringer | http://www.mssccmfaq.de

  • Sccm 2012 simulate deployment for task sequence / OS or applications

    Hi
    I have been getting a lot of problems with Os/Application Task Sequences and have been asked a few questions.
    I cannot find anything on the Web about Limitations for a simulated deployment in SCCM 2012.
    I know SCCM allows you to create them but does it work/Are the results accurate?
    I need to know the following: 
    Can you simulate an OS Deployment Task Sequence?
    Can you simulate an Application Deployment Task Sequence?
    Are there limitations to Simulated Deployments?
    Thanks guys Hope this makes sense and you can help.
    Regards
    Anthony

    If you have the MDT integration with SCCM 2012 you can simulate the settings used by the task sequence, but not the actual task sequence deployment. However, seeing the settings is often enough.
    Check this post:
    Save time (and avoid pain) - Create a MDT simulation environment
    http://www.deploymentresearch.com/Research/tabid/62/EntryId/155/Save-time-and-avoid-pain-Create-a-MDT-simulation-environment.aspx
    / Johan
    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch

  • SCCM 2012 vs WSUS for Windows Server Updates

    Hi, 
    Can anyone assist with clarifying the benefit of using SCCM 2012 for server patching over WSUS. As far as i understand SCCM can manage updates for third party applications if configured correctly. However if this is the only benefit I cannot see a clear
    reason for using it. 
    Any information on the benefits of SCCM for server patching would be much appreciated. 
    Regards, 
    Michael. 

    Hi,
    There are many reasons to use SCCM for patching instead of WSUS, I wrote a blog post a while ago listing 12 reasons why you should use it.
    http://ccmexec.com/2012/08/top-11-reasons-why-you-should-use-configmgr-2012-for-managing-software-updates/
    I hope that helps!
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • SCCM 2012 sp1 - can't add boot image - Only finalized boot images are supported.

    so when i updated to sp1 i had to install the new assessment and deployment kit which i have done.
    when i try to add a boot image to sccm now i get the error:
    You can not import this boot image. Only finalized boot images are supported. For more information press F1.
    i have searched technet and on old versions of sccm you could re-install waik to fix this issue, i have tried re-installing ADK and its still doing the same.
    has anyone had this problem on 2012 sp1?

    Hi,
    It works to import x86 image of windows 8 and now I have some problems when I try to import x64 boot image of 8.1.
    Where I can see errors in logs. Are sow many log files and I'm little confuse and I cant find error to see what is the reason of this error.
    And the error is:
    Error: Data Source
    Information
    • Source location:
    \\xxx\yyy\X17-24269\sources\boot.wim
    • Boot Image:
    1 - Microsoft
    Windows PE (x64)
      Error: Package
    Information
    • Name: boot
      Error: Errors
    • You can not
    import this boot image.
    Only finalized boot images are supported.
    For more information press F1.

  • SCCM 2012 Monitoring Parameters for Tivoli

    Hello all,
    I am looking for a list of services/locations for SCCM to be monitored via Tivoli. Please share if someone already have created this..
    Thanks, V@s!m

    I would simply look at the SCOM documentation for monitoring ConfigMgr 2012, see:
    https://www.microsoft.com/en-us/download/details.aspx?id=29267
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • SCCM 2012 Query report for specific software installed.

    I have Reporting point installed and it seems to be working as I was able to run OS reports.
    Here's what I would like to do.
    1. I need a query/report to show us all the machines that do not have Microsoft Forefront Endpoint Protection installed.
    2. I also need a query/report showing what machines still have Sophos AV installed.
    Any help is greatly appreciated it.
    Thanks,
    Voev

    I was not able to use the Reporting to get computers without FEP installed. So I did a workaround.
    Create Device Collection for computers with FEP installed
    1. Device Collections => Create Device Collection =>name it "Computers with FEP installed=> Query Rule Properties => Edit Query Statement => Criteria tab => Add the following statements
    Criterion Type: Simple value
    Where: Installed Software - ARPDisplay Name
    Operator: is equal to
    Value: System Center 2012 Endpoint Protection          (as appeared in Add/remove program name)
    Create Device Collection for computers without FEP installed
    1. Device Collections => Create Device Collection => Name "Computers without FEP Installed" => Query Rule Properties => Add Rule => Include Collections => Tick "All Systems" => OK =>  then you need to add
    the Exclude by => Add Rule => Exclude Collections => Tick " Computers with FEP Installed => OK
    So in my "All Systems" Collection has 1000 members
    Computers with FEP Installed collection has 900 members
    Computers without FEP Installed collection has 100 members
    Add the with FEP installed & without FEP installed collections together is equal to 1000 members of the All Systems.

  • SCCM 2012 usage report for remote users

    Hi,
    Can someone help to get the SCCM  usage report for all remote users who accessed particular application remotely on windows 7 workstation
    Regards,
    Madhan

    If the application is something and executable that the users have to start, you can use Software Metering.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • SCCM 2012 Reporting Capabilities for Software Metering

    Hi,
    I've been requested by my supervisors to get some information on metered software and computer usage in a specific lab, but I am unsure if I can obtain all the information they requested with just using SCCM. 
    I've already set up metering rules for the programs they want information on, software metering is enabled on the clients, and all of the lab computers are in in Configmgr and have good clients on them.  Here's the list of the requests:
    Total number of lab users by day
    Total hours logged into lab computers by day
    Total hours logged into a specific metered program by day
    Total hours running different internet browsers
    Total unique users over the course of a certain period of time
    I am a novice when it comes to reports in SCCM.  Are there built in reports that can give this information or would I have to write my own custom reports, or is this level of detail not possible for SCCM to give?
    Any advice would be appreciated.
    Thanks!

    The most requested information can be found in the obvious reports about
    Software Metering (\Monitoring\Overview\Reporting\Reports\Software Metering).
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • SCCM 2012 Antivirus Exclusions for Servers and Workstations

    Hii,
    Just sharing the antivirus exclusions for Configuration Manager 2012 Servers and workstations as well.
    Please share if anything is missing.
    McAfee Exclusion's for Configuration Manager 2012:
    1. C:\Windows\TEMP\BootImages
    and subfolders.
    2. Directories:
    %allusersprofile%\NTUser.pol
    %systemroot%\system32\GroupPolicy\registry.pol
    %windir%\Security\database\*.chk
    %windir%\Security\database\*.edb
    %windir%\Security\database\*.jrs
    %windir%\Security\database\*.log
    %windir%\Security\database\*.sdb
    %windir%\SoftwareDistribution\Datastore\Datastore.edb
    %windir%\SoftwareDistribution\Datastore\Logs\edb.chk
    %windir%\SoftwareDistribution\Datastore\Logs\edb*.log
    %windir%\SoftwareDistribution\Datastore\Logs\Edbres00001.jrs
    %windir%\SoftwareDistribution\Datastore\Logs\Edbres00002.jrs
    %windir%\SoftwareDistribution\Datastore\Logs\Res1.log
    %windir%\SoftwareDistribution\Datastore\Logs\Res2.log
    %windir%\SoftwareDistribution\Datastore\Logs\tmp.edb
    %programfiles%\Microsoft Configuration Manager\Inboxes\*.*
    %programfiles(x86)%\Microsoft Configuration Manager\Inboxes\*.*
    %systemroot%\system32\GroupPolicy\Machine\registry.pol"
    %systemroot%\system32\GroupPolicy\User\registry.pol"
    \SCCMContentLib
    \SMSPKG
    \SMSPKGC$
    \SMSPKGSIG
    \SMSSIG$
    \Program Files\SMS_CCM\ServiceData
    \Program Files\SMS_CCM\Logs
    \Program Files\Microsoft Configuration Manager\Logs
    \Program Files\Microsoft Configuration Manager\Install.map
    \ConfigurationManager DB
    \SMSPKGSIG
    \SCCMContentLib
    \Sources
    \SCCMImages
    \DatabaseBackup
    \SMSPKGE$
    \SMSPKGSIG
    \SMSSIG$
    3. Processes that will be excluded:
    Configuration Manager 2012 processes that will be excluded are:
    Smsexec.exe
    Ccmexec.exe
    CmRcService.exe
    Sitecomp.exe
    Smswriter.exe
    Smssqlbbkup.exe
    4. SQL Server Exclusion's:
    SQL Server 2012 Processes exclude from virus scanning
    %ProgramFiles%\Microsoft SQL Server\MSSQL11. <InstanceName>\MSSQL\Binn\SQLServr.exe
    %ProgramFiles%\Microsoft SQL Server\MSRS11. <InstanceName>\Reporting Services\ReportServer\Bin\ReportingServicesService.exe
    %ProgramFiles%\Microsoft SQL Server\MSAS11. <InstanceName>\OLAP\Bin\MSMDSrv.exe
    SQL Server data files
    *.mdf
    *.ldf
    *.ndf
    SQL Server backup files
         These files frequently have one of the following file-name extensions:
    *.bak
    *.trn
    Full-Text catalog files
    %Program Files%\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\FTData
    Analysis Services backup files
         C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Backup
         C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Log
    5. IIS Exclusions:
    * .ida
    %systemroot%\IIS Temporary Compressed Files
    %SystemDrive%\inetpub\temp\IIS Temporary Compressed Files
    6. WSUS Exclusions:
    *.cab
    \WSUS\WSUSContent
    \WSUS\UpdateServicesDBFiles
    \SoftwareDistribution\Datastore
    \SoftwareDistribution\Download
    Reference Links:
    https://community.mcafee.com/thread/59504
    http://www.systemcenterblog.nl/2012/05/09/anti-virus-scan-exclusions-for-configuration-manager-2012/
    http://social.technet.microsoft.com/wiki/contents/articles/953.microsoft-anti-virus-exclusion-list.aspx
    http://support.microsoft.com/kb/309422
    http://support.microsoft.com/kb/821749
    http://support.microsoft.com/kb/817442
    http://support.microsoft.com/kb/900638/en-us
    http://technet.microsoft.com/en-us/library/dd939908(WS.10).aspx#av
    McAfee Exclusions for workstations:
    Turn off scanning of Windows Update or Automatic Update related files
    Turn off scanning of the Windows Update or Automatic Update database file (Datastore.edb). This file is located in the following folder:
    %windir%\SoftwareDistribution\Datastore
    Turn off scanning of the log files that are located in the following folder:
    %windir%\SoftwareDistribution\Datastore\Logs
    Specifically, exclude the following files:
    Res*.log
    Edb*.jrs
    Edb.chk
    Tmp.edb
    Turn off scanning of Windows Security files
    Add the following files in the %windir%\Security\Database path of the exclusions list:
    *.edb
    *.sdb
    *.log
    *.chk
    *.jrs
    Turn off scanning of Group Policy related files
    Group Policy user registry information. These files are located in the following folder:
    %allusersprofile%\
    Specifically, exclude the following file:
    NTUser.pol
    Group Policy client settings file. This file is located in the following folder:
    %Systemroot%\System32\GroupPolicy\
    Specifically, exclude the following file: Registry.pol
    For the configuration manager clients the following exclusion will be added:
    %windir%ccmcache
    \SoftwareDistribution\Datastore
    \SoftwareDistribution\Download
    Reference Links:
    http://support.microsoft.com/kb/822158/en-us
    Regards, Syed Fahad Ali

    Thanks for sharing this.. Many people will find this useful.
    http://www.enhansoft.com/

  • SCCM 2012 R2 OSD Win7, a Reference Image or Install.wim from the Win 7 media

    I want to use thin image to deploy win7.
    So do I need to built a reference Image, or I can use install.wim from Windows 7 media directly?
    I saw someone suggest built a reference Image fist. so what different between  builting a reference Image or using install.wim from Win7 media?

    Hi,
    When you build your won reference image you can include your own software and Software Updates which makes it a lot faster to deploy. I normally add:
    - Windows 7 hotfixes that are not delivered through WSUS/Microsoft Update
    - Visual Studio Runtimes 2005,2008,2010,2012
    - .NET framework 4.5
    - And all the latest software updates from Microsoft.
    So I recommend that you create your own image.
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec
    Also it's best practice to build and capture using a VM rather than physical.
    Cheers
    Paul | sccmentor.wordpress.com

Maybe you are looking for