Error when a TS step has a condition to check for custom variable. Variable is set on the collection.

SCCM Version = SCCM 2012 R2 CU3
Background
I would like to setup some sort of safety check to help prevent accidentally sending and OSD out to all the servers managed by SCCM. The solution I am trying to use is making the TS do a check for a custom variable. If the variable is NOT set to TRUE
then it should reboot the machine back to the currently installed OS.
The variable is called "AllowOSD"
AllowOSD is set correctly on my "Test Servers" collection
I'm using the built in "Reboot Computer" step in the TS
The condition on the Reboot Computer step is very basic - "Task Sequence Variable AllowOSD is not equal TRUE".
I am testing the TS on a VM guest (Hyper-V)
I'm deploying via PXE for these tests...
The Issue
As soon as the TS starts I get the annoyingly generic 0x80004005 error - smsts.log posted on github -
smsts.log-A
Possibly related issue:
I have a vbscript that prompts for, and sets, the computer name. This works fine if placed after the format disk step, but if I place it before the format disk step then I get error 0x800700A1. If I format the internal HD first then I don't get an error
and it all works fine.
smsts.log posted on github - smsts.log-B
Be aware VM_1 and VM_2 have unformatted disks (vhdx). I don't want them to be formatted before checking that the task sequence should really be running in the first place. As already mentioned, I am trying to prevent someone wiping out a bunch of servers
by accident.
My Task Sequences are based on the defaults created by the wizard. Here are the step I'm using...
* Reboot if AllowOSD is not TRUE
Restart in Windows PE
* set Computer Name
Partition DIsk 0 - DIOS
Partition Disk 0 - UEFI
Install Operating System
Apply Windows Settings
Apply Network Settings
Setup Windows and Config Manager
* = steps I have created.
All other steps are defaults as created by wizard.
Please note the "Restart in Windows PE" step does a conditional check on "_SMSTSInWinPE" without any errors. it is looking like the use of custom variables is not supported until the local HD is formatted and mounted. Can
anyone confirm this behaviour, or what I can do to get around this problem.
I have tried using a vbscript but triggering a reboot from VB does nothing, hence using the Reboot Computer step in the TS.
Thanks
"Well I'm all out of ideas." - 85

As others have stated, your options are limited the moment you rely on PXE and WinPE but I think all you need to do is refine your collection target a bit.
Why not instead of deploying your TS to All Systems (which is what I'm guess you're doing) and trying to put a condition in, deploy to a collection that is based on a workstation collection then include unknown computers?  Then any "known workstation"
will have a MAC stored and thus be permitted to use the TS, unknown machines will be as well ... but "known servers" will be blocked?
COnsidering the PXE looks for permitted MAC addresses this should work (Ill try it in my own lab).
Tested and verified:
Simply create a collection with a parent collection of all systems.
Add a workstation query:
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion LIKE "%Workstation%"
Then "include" unknown computers.
End result is any machine that has "server" in it's version that has already been deployed will not be able to use the deployment.  If you'd rather base existing computer on an OU or group membership just modify the first query how you see fit.
 This will let known workstations (or whatever) and unknown machines get deployed to ... but known machines NOT in that collection will be skipped.

Similar Messages

Maybe you are looking for

  • How do I import an unpublished site from one computer to another?

    Hello all, I prepared my website on my computer at home, which is not configured to publish the site into my university's public folder. So I copied the website onto a memory card and now I would like to open the site on my work computer's iweb to ad

  • DVD's to IPAD2 via MAC 10.4.11?

    I am wanting to rip and copy DVD's to my new IPAD2 from my MAC PC software version 10.4.11. Can anyone recommend easy to use software to achieve this?

  • OUI-10055:Error in accessing the registry - webcenter content installation

    Hi All, I get this OUI error while installing Webcenter Content 11g. I checked the registry permission on HKEY_LOCAL_MACHINE -> Software -> Oracle and it has necessary permission for the user. Can someone help me identify what other registry location

  • UDF for Separating the Fields

    Hi, I am getting the 4 fields of data in single field from souce system, i need to send to target side with 4 Diffrent Fields. I want to separate the data based on (/). I think for this I need 4 UDF's, Pls let me know the UDF's for this requirement.

  • Scenario Possibility

    Hi - I am not sure if this functionality is possible in SAP XI 2.0. If someone can help me with this quickly it would be of great help. I wanted to know if it is possible to transfer a message from one Interface to Another. The scenario is something