Jump to content


JCA

Established Members
  • Content Count

    8
  • Joined

  • Last visited

  • Days Won

    1

JCA last won the day on March 21 2012

JCA had the most liked content!

Community Reputation

1 Neutral

About JCA

  • Rank
    Newbie
  1. Guys, I'm trying to skip unwanted deployment pages in my MDT Wizard. It seems the very first screen works, but once I click NEXT, the entire list of pages are showing and it makes me walk through each one. I minimized my Bootstrap.ini and CustomSettings.ini I only want to show the following pages; Task Sequence Page Computer Details Page Local and Time Page Ready Page But for some reason after I click the Task Sequence, I receive this list. Then I have to go to each page without the ability to skip. Welcome Page Network Credentials Page Task Sequence Page Computer Details Page Mover data and settings Page User Data (Restore) Page Local and Time Page Capture image Page Ready Page My CustomSettings.ini and BootStrap.ini [settings] Priority=Default [Default] SkipBDDWelcome=NO SkipTaskSequence=NO SkipComputerName=YES SkipDomainMembership=YES SkipUserData=YES SkipComputerBackup=YES SkipProductKey=YES SkipPackageDisplay=YES SkipLocaleSelection=NO SkipTimeZone=NO SkipRoles=YES SkipApplications=YES SkipAdminPassword=YES SkipAdminAccounts=YES SkipCapture=YES SkipBitLocker=YES SkipSummary=YES SkipFinalSummary=NO MDT.bmp
  2. Just to give an update on what’s happening with this. I found out this format is unsupported by MS with Windows Vista and newer OS’s. Instead you must utilize two other additional roles on the CA to have this work. The caviate is, I’m down to the testing and it’s not working as in the document. I have MS Support working with me to resolve this issue since it was written by MSFT. http://blogs.technet.com/b/askds/archive/2010/05/25/enabling-cep-and-ces-for-enrolling-non-domain-joined-computers-for-certificates.aspx and use this doc for similar workgroup computers for rolling out certs. This was written for RT devices, however, it should work once I get to that point. http://blogs.technet.com/b/pki/archive/2012/12/11/certificate-for-winrt-devices-and-non-domain-member-devices.aspx
  3. Hello everyone, I’m having issues with workgroup computers, not domain systems when I request a certificate. The domain computers are receiving their certificates via GPO. It’s extremely weird. It has something to do with Windows 7 and Windows 2008 machines. On a 2003 server, I can request a certificate manually with certutil and "see" the certificate template. I copy over the exact command on windows 7 and it can’t "see" the certificate template. The Error --- Template not found. I have the following configuration: CA Enterprise I have created the SCCM Client Certificate I have created the SCCM Web Server Certificate I have created the SCCM Distribution Point Certificate GPO is configured SCCM 2012 R2 CU2 configured to do HTTP and HTTPS Installed SCCM Client Certificate Installed SCCM Web Server Certificate Installed Distribution Point Certificate Deployed to a domain computer good on PKI Workgroup Computers: I’m having issues with deploying certificates Windows 7 – (ERROR) not successful Windows Server 2008 R2 – (ERROR) not successful Windows Server 2003 - successful Windows XP – successful How I’m getting the certs for the clients is by utilizing the following scripts from this URL. http://www.ithierarchy.com/ITH/node/48 I did find a couple of errors in the code, but if it’s working on my Server 2003, then it should work on the others. Windows 7 and Windows 2008 R2 seem to have the same issue. The error I’m getting is the following: Command line requesting the cert ---- CertReq –new –f testcomputer.home.pvt.inf c:\client\testcomputer.home.pvt.req Error --- Template not found. SCCMClientCertificate (this is my template)
  4. I'm trying to start a child runbook from another child runbook via powershell using the .net script activity. I've tried many powershell scripts and they work if I'm testing them from the server level, but they don't work if I place them in a runbook .net script activity. I don't receive any errors from them since I worked out most issues. Any help would be much appreciated. James
  5. I fixed it and it's finish! Here's the code if anyone wants it. <html> <head> <title>USMT | Windows 7 Image</title> <script language="VBScript">Window.ResizeTo 913,810</script> <script language="VBScript">Window.MoveTo ((Screen.AvailWidth -913) / 2), 10</script> <HTA:APPLICATION ID="objOSDReg" APPLICATIONNAME="OSD_Registration" SINGLEINSTANCE="yes" BORDER="thin" ICON="Deploy.ico" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="yes" NAVIGABLE="yes" > </head> <script LANGUAGE="VBScript"> 'Set Variables: Site Server, Username and Password 'Server = "XXXXXXXXX" 'userName = "XXXXXXXXX" 'userPassword = "XXXXXXXXX" Dim computera, computerb, ResIDA, ResIDB, sccmserver, server, userid, userName, pswd, userpassword Dim strSourceResourceID, strDestinationResourceID, strCaptureCollectionID, strRestoreCollectionID, objSMS Sub AssociateCompAandCompB 'Server = document.getElementById("sccmserver").value 'username = document.getElementById("userid").value 'userpassword = document.getElementById("pswd").value strcomputera = document.getElementById("computera").value strcomputerb = document.getElementById("computerb").value strCaptureCollectionID = "OKE0033E" strRestoreCollectionID = "OKE0033D" ' connection to SCCM server Set objSMS = Connect(Server, userName, userpassword) ResIDA = GetResourceIDFromName (objSMS, strcomputera) ResIDB = GetResourceIDFromNameB (objSMS, strcomputerb) 'AddtoCollection If (ResIDA <> 0) And (ResIDB <> 0) Then AssociateComputer objSMS, ResIDA, ResIDB AddtoCollection strcomputerA, ResIDA, strCaptureCollectionID AddtoCollection strcomputerb, ResIDB, strRestoreCollectionID Else General_OnClick() End If End Sub ' ------------------------------------------------------------------------------------------------------------------- ' Associate Computers in SCCM Computer Association ' ------------------------------------------------------------------------------------------------------------------- Sub AssociateComputer(objSMS, referenceComputerResourceId, destinationComputerResourceId) Dim stateMigrationClass Dim inParams Dim outParams 'On Error Resume Next ' Get the state migration class. Set stateMigrationClass = objSMS.Get("SMS_StateMigration") ' Set up the parameters. Set inParams = _ stateMigrationClass.Methods_("AddAssociation").InParameters.SpawnInstance_ inParams.SourceClientResourceID = referenceComputerResourceId inParams.RestoreClientResourceID = destinationComputerResourceId ' Call the method Set outParams = objSMS.ExecMethod( "SMS_StateMigration","AddAssociation",inParams) ' MsgBox Err if Err.number <> 0 Then MsgBox "Failed to create a Computer Association, please try again or contact the Windows Deployment Team Lead" Exit Sub Else General_OnClick() End If End Sub ' ------------------------------------------------------------------------------------------------------------------- 'AddtoCollection(name, ResourceID, collectionID) ' ------------------------------------------------------------------------------------------------------------------- Sub AddtoCollection(name, ResourceID, collectionID) 'Sub AddtoCollection(connection, referenceComputerResourceId, destinationComputerResourceId) 'Dim instColl 'Dim instDirectRule 'if one exists create a collection rule Set instColl = objSMS.Get("SMS_Collection.CollectionID="&"""" & collectionID & """") Set instDirectRule = objSMS.Get("SMS_CollectionRuleDirect").SpawnInstance_ () instDirectRule.ResourceClassName = "SMS_R_System" instDirectRule.ResourceID = ResourceID instDirectRule.RuleName = name & " - " & ResourceID instColl.AddMembershipRule instDirectRule , SMSContext instColl.RequestRefresh False ' log name & " Added to " & Instcoll.Name ' wscript.echo(name & " Added to " & Instcoll.Name) MsgBox (name & " Added to " & Instcoll.Name) ' MsgBox Err if Err.number <> 0 Then MsgBox "Failed to create a Computer Association, please try again or contact the Windows Deployment Team Lead" Exit Sub Else General_OnClick() End If End Sub ' ------------------------------------------------------------------------------------------------------------------- ' Utility function to search for the site code ' ------------------------------------------------------------------------------------------------------------------- Function Connect(server, userName, userPassword) 'On Error Resume Next Dim net Dim localConnection Dim swbemLocator Dim swbemServices Dim providerLoc Dim location Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")' swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy. ' If the server is local, don't supply credentials. ' Set net = CreateObject("WScript.NetWork") ' If UCase(net.ComputerName) = UCase(server) Then ' localConnection = True ' userName = "" ' userPassword = "" ' server = "." ' End If ' Connect to the server. Set swbemServices= swbemLocator.ConnectServer _ (server, "root\sms",userName,userPassword) If Err.Number<>0 Then ' Wscript.Echo "Couldn't connect: " + Err.Description Connect = Null Exit Function End If ' Determine where the provider is and connect. Set providerLoc = swbemServices.InstancesOf("SMS_ProviderLocation") For Each location In providerLoc If location.ProviderForLocalSite = True Then Set swbemServices = swbemLocator.ConnectServer _ (location.Machine, "root\sms\site_" + _ location.SiteCode,userName,userPassword) If Err.Number<>0 Then ' Wscript.Echo "Couldn't connect:" + Err.Description Connect = Null Exit Function Else 'Wscript.Echo "Yay, we connected!!" End If Set Connect = swbemServices Exit Function End If Next Set Connect = null ' Failed to connect. End Function ' ------------------------------------------------------------------------------------------------------------------- ' GetResourceID From Name A ' ------------------------------------------------------------------------------------------------------------------- Function GetResourceIDFromName(objSMS, strcomputera) 'On Error Resume Next ' Build Query string. query = "SELECT ResourceId FROM SMS_R_System WHERE NetbiosName = """ & strcomputera & """" ' Execute the query 'Set result = connection.ExecQuery(query) Set result = objSMS.ExecQuery(query) If Err then CheckError 'MsgBox "error on a" Exit Function End If ' Walk through the elements of the enumerator. ' Assume there will only be 1 computer with the requested name, if any. resourceID = 0 ' Assume the worst For each r in result GetResourceIDFromName = r.ResourceID 'MsgBox r.resourceID Next End Function ' ------------------------------------------------------------------------------------------------------------------- ' GetResourceID From Name B ' ------------------------------------------------------------------------------------------------------------------- Function GetResourceIDFromNameB(objSMS, strcomputerb) On Error Resume Next ' Build Query string. query = "SELECT ResourceId FROM SMS_R_System WHERE NetbiosName = """ & strComputerB & """" ' Execute the query Set result = objSMS.ExecQuery(query) 'Set result = connection.ExecQuery(query) If Err then CheckError Exit Function End If ' Walk through the elements of the enumerator. ' Assume there will only be 1 computer with the requested name, if any. resourceID = 0 ' Assume the worst For each b in result GetResourceIDFromNameB = b.ResourceID 'MsgBox b.resourceID Next End Function ' ------------------------------------------------------------------------------------------------------------------- ' ------------------------------------------------------------------------------------------------------------------- Sub General_OnClick() strHtm = "<table class=""tbl"">" strHtm = strHtm & "<tr><td>_________________________</td><td>_________________</td></tr>" strHtm = strHtm & "<tr><td>Source Computer </td><td>" & document.getElementById("computera").value & "</td></tr><tr></tr>" strHtm = strHtm & "<tr><td>_________________________</td><td>_________________</td></tr>" strHtm = strHtm & "<tr><td>Destination Computer </td><td>" & document.getElementById("computerb").value & "</td></tr>" strHtm = strHtm & "</table>" 'Next dataarea.innerhtml = strHtm End Sub </SCRIPT> <!-- ------------------------------------------------------------------------------------------------------------------- --> <!-- HTML Starts --> <!-- ------------------------------------------------------------------------------------------------------------------- --> <body style="font-family: Arial; background-image: url('Win7_wallpaper-blue2.jpg'); background-repeat: no-repeat; background-color: black; color: white;"> <!--OSD Registration Header--> <table style="text-align: left; width: 100px;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td><big><big><big><big><span> OSD</span></big></big></big></big></td> <td style="text-align: right;"><span> powered<br> by</span></td> <td><span><img style="width: 301px; height: 64px;" alt="System Center" src="file:logo-system-center.gif"></span></td> </tr> </tbody> </table> <!--Line Break--> <hr style="color:#00B2EE"> <!--Deployment Scenario Selection--> <table align="center" width="90%"> <tr><td> <h3> Server Connection</h3> <!-- HTA Text Input Box for Server--> <p> Server: <input type="text" id="sccmserver" size="18"><BR> UserName: <input type="text" id="userid" size="18"><BR> Password: <input type="password" id="pswd" size="18"></p> </td></tr> </table> <table align="center" width="90%"> <tr><td> <BR> <h3> Computer Association</h3> <!-- HTA Text Input Box for Computer A (Source)--><!-- HTA Text Input Box for Computer B (Destination)--> <p> Source Computer: <input type="text" id="ComputerA" size="15"><BR> Destination Computer: <input type="text" id="ComputerB" size="15"></p> <!-- A - AssociateCompAandCompB --> <!-- Resets Page --> <p> <input id=runbutton type="button" value="Create Computer Association" name="run_button" onClick="AssociateCompAandCompB"> <input type="button" value="Reset Page" onClick="window.location.reload()"></p><BR> </td></tr> </table> <!-- Display Data on HTA screen --> <table align="center" width="85%"> <tr><td> <!--Line Break--> <div style="margin: 25px 100px 0px 0px; background-color: transparent; padding: 10px;"> <div> <hr style="color:#00B2EE"> <div> <h4>Computer Association Output<h4> <div id="dataarea"></div> </div> </td></tr> </table> <br><br> <!--Version #--> <small style="color: rgb(100,100,100)"> #1v1.1</small> <table align="center" valign="center" width="100%"> <tr><big><big><span id="msgTXT"> </span></big></big><br></tr> <tr style="color:red;"><big><big><span id="msgERR"> </span></big></big><br></tr> </table> </body> </html>
  6. Peter, I typicaly don't write VBscript and HTA. I didn't mean to leave the section of code "Add Computer to Scanstate and Loadstate Collections in SCCM" to the first post. I found the code on the internet and have tried to modify this to do what I need. My goal is to allow a third party company to Migrate user state from XP to Windows 7 during our Windows 7 Migration project. Doing this tasks through SCCM console isn't worth it when the 3rd party staff will be changing during the project. I need to have the Source Computer and the Destination computer do the following when the "Create Computer Associatation" button is pushed. 1. Add Source and Destination computer to the Computer Association in SCCM OSD2. Add Source Computer to the Collection I called Scanstate3. Add Destination Computer to the Collection I called Loadstate I'll keep you posted.
  7. Thank you! I wish I could figure out that Add computer to a specific collection. That's kiling me litteraly!
  8. Hello everyone! Use IIS Pool for Authentication and not have Userid and Password in clear text. (Thank you Niall!) My goal is to allow a third party company to Migrate user state from XP to Windows 7 during our Windows 7 Migration project. Doing this tasks through SCCM console isn't worth it when the 3rd party staff will be changing during the project. I need to have the Source Computer and the Destination computer do the following when the "Create Computer Associatation" button is pushed. 1. Add Source and Destination computer to the Computer Association in SCCM OSD 2. Add Source Computer to the Collection I called Scanstate 3. Add Destination Computer to the Collection I called Loadstate The Computer Association Script that does work perfectly! ( I took this script from some ones blog and I added a little changes) <html> <head> <title>USMT | Windows 7 Image</title> <script language="VBScript">Window.ResizeTo 913,810</script> <script language="VBScript">Window.MoveTo ((Screen.AvailWidth -913) / 2), 10</script> <HTA:APPLICATION ID="objOSDReg" APPLICATIONNAME="OSD_Registration" SINGLEINSTANCE="yes" BORDER="thin" ICON="Deploy.ico" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="yes" NAVIGABLE="yes" > </head> <script LANGUAGE="VBScript"> 'Set Variables: Site Server, Username and Password Server = "sccm server name" userName = "userid" userPassword = "password" Sub AssociateCompAandCompB Dim computera, computerb, ResIDA, ResIDB strcomputera = document.getElementById("computera").value strcomputerb = document.getElementById("computerb").value Set connection = Connect(Server, userName, userPassword) ResIDA = GetResourceIDFromName (connection, strcomputera) ResIDB = GetResourceIDFromNameB (Connection, strcomputerb) AssociateComputer Connection, ResIDA, ResIDB', ResIDA, ResIDB End Sub ' ------------------------------------------------------------------------------------------------------------------- ' Associate Computers in SCCM Computer Association ' ------------------------------------------------------------------------------------------------------------------- Sub AssociateComputer(connection, referenceComputerResourceId, destinationComputerResourceId) Dim stateMigrationClass Dim inParams Dim outParams 'On Error Resume Next ' Get the state migration class. Set stateMigrationClass = connection.Get("SMS_StateMigration") ' Set up the parameters. Set inParams = _ stateMigrationClass.Methods_("AddAssociation").InParameters.SpawnInstance_ inParams.SourceClientResourceID = referenceComputerResourceId inParams.RestoreClientResourceID = destinationComputerResourceId ' Call the method Set outParams = connection.ExecMethod( "SMS_StateMigration","AddAssociation",inParams) 'connection.ExecMethod stateMigrationClass.AddAssociation,inParams ' MsgBox Err if Err.number <> 0 Then MsgBox "Failed to create a Computer Association, please try again or contact the GOC" Exit Sub Else General_OnClick() End If End Sub ' ------------------------------------------------------------------------------------------------------------------- ' Utility function to search for the site code ' ------------------------------------------------------------------------------------------------------------------- Function Connect(server, userName, userPassword) 'On Error Resume Next Dim net Dim localConnection Dim swbemLocator Dim swbemServices Dim providerLoc Dim location Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")' swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy. ' If the server is local, don't supply credentials. Set net = CreateObject("WScript.NetWork") If UCase(net.ComputerName) = UCase(server) Then localConnection = True userName = "" userPassword = "" server = "." End If ' Connect to the server. Set swbemServices= swbemLocator.ConnectServer _ (server, "root\sms",userName,userPassword) If Err.Number<>0 Then ' Wscript.Echo "Couldn't connect: " + Err.Description Connect = Null Exit Function End If ' Determine where the provider is and connect. Set providerLoc = swbemServices.InstancesOf("SMS_ProviderLocation") For Each location In providerLoc If location.ProviderForLocalSite = True Then Set swbemServices = swbemLocator.ConnectServer _ (location.Machine, "root\sms\site_" + _ location.SiteCode,userName,userPassword) If Err.Number<>0 Then ' Wscript.Echo "Couldn't connect:" + Err.Description Connect = Null Exit Function Else 'Wscript.Echo "Yay, we connected!!" End If Set Connect = swbemServices Exit Function End If Next Set Connect = null ' Failed to connect. End Function ' ------------------------------------------------------------------------------------------------------------------- ' ------------------------------------------------------------------------------------------------------------------- Function GetResourceIDFromName(connection, strcomputera) 'On Error Resume Next ' Build Query string. query = "SELECT ResourceId FROM SMS_R_System WHERE NetbiosName = """ & strcomputera & """" ' Execute the query Set result = connection.ExecQuery(query) If Err then CheckError 'MsgBox "error on a" Exit Function End If ' Walk through the elements of the enumerator. ' Assume there will only be 1 computer with the requested name, if any. resourceID = 0 ' Assume the worst For each r in result GetResourceIDFromName = r.ResourceID 'MsgBox r.resourceID Next End Function ' ------------------------------------------------------------------------------------------------------------------- ' ------------------------------------------------------------------------------------------------------------------- Function GetResourceIDFromNameB(connection, strcomputerb) On Error Resume Next ' Build Query string. query = "SELECT ResourceId FROM SMS_R_System WHERE NetbiosName = """ & strComputerB & """" ' Execute the query Set result = connection.ExecQuery(query) If Err then CheckError Exit Function End If ' Walk through the elements of the enumerator. ' Assume there will only be 1 computer with the requested name, if any. resourceID = 0 ' Assume the worst For each b in result GetResourceIDFromNameB = b.ResourceID 'MsgBox b.resourceID Next End Function ' ------------------------------------------------------------------------------------------------------------------- ' ------------------------------------------------------------------------------------------------------------------- Sub General_OnClick() strHtm = "<table class=""tbl"">" strHtm = strHtm & "<tr><td>_________________________</td><td>_________________</td></tr>" strHtm = strHtm & "<tr><td>Source Computer </td><td>" & document.getElementById("computera").value & "</td></tr><tr></tr>" strHtm = strHtm & "<tr><td>_________________________</td><td>_________________</td></tr>" strHtm = strHtm & "<tr><td>Destination Computer </td><td>" & document.getElementById("computerb").value & "</td></tr>" strHtm = strHtm & "</table>" 'Next dataarea.innerhtml = strHtm End Sub </SCRIPT> <!-- ------------------------------------------------------------------------------------------------------------------- --> <!-- HTML Starts --> <!-- ------------------------------------------------------------------------------------------------------------------- --> <body style="font-family: Arial; background-image: url('Win7_wallpaper-blue2.jpg'); background-repeat: no-repeat; background-color: black; color: white;"> <!--OSD Registration Header--> <table style="text-align: left; width: 100px;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td><big><big><big><big><span> OSD</span></big></big></big></big></td> <td style="text-align: right;"><span> powered<br> by</span></td> <td><span><img style="width: 301px; height: 64px;" alt="System Center" src="file:logo-system-center.gif"></span></td> </tr> </tbody> </table> <!--Line Break--> <hr style="color:#00B2EE"> <!--Deployment Scenario Selection--> <table align="center" width="90%"> <tr><td> <h3> Computer Association</h3> <!-- HTA Text Input Box for Computer A (Source)--><!-- HTA Text Input Box for Computer B (Destination)--> <p> Source Computer = <input type="text" id="ComputerA" size="18"> Destination Computer = <input type="text" id="ComputerB" size="18"></p> <!-- A - AssociateCompAandCompB --> <!-- Resets Page --> <p> <input id=runbutton type="button" value="Create Computer Association" name="run_button" onClick="AssociateCompAandCompB"> <input type="button" value="Reset Page" onClick="window.location.reload()"></p><BR> </td></tr> </table> <!-- Display Data on HTA screen --> <table align="center" width="85%"> <tr><td> <!--Line Break--> <div style="margin: 200px 130px 0px 0px; background-color: transparent; padding: 10px;"> <div> <hr style="color:#00B2EE"> <div> <h4>Computer Association Output<h4> <div id="dataarea"></div> </div> </td></tr> </table> <br><br> <!--Version #--> <small style="color: rgb(100,100,100)"> #1v1.0</small> <table align="center" valign="center" width="100%"> <tr><big><big><span id="msgTXT"> </span></big></big><br></tr> <tr style="color:red;"><big><big><span id="msgERR"> </span></big></big><br></tr> </table> </body> </html>
×
×
  • Create New...