Jump to content


jkjk12

Established Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jkjk12

  • Rank
    Newbie
  1. OK, I have now confirmed the reg keys in question are present. But no matter what I do I can't run this PowerShell script from with a Task Sequence. I have tried to do this manually with psexec. I have opened up a CMD window "as Administrator" and I've run two different commands. Command 1: Fails with Access Denied. psexec -s -accepteula cmd.exe /c powershell.exe "C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy bypass -file c:\temp\run.ps1" Command 2: Works!! psexec -u acme.org\MyAdminID -p MyPassword -accepteula cmd.exe /c powershell.exe "C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy bypass -file c:\temp\run.ps1" how do I mimic Command 2 inside of a CM2012 task sequence? Trust me, I've tried many things. Create a package with no program. Run a PowerShell script. Run a Command Line (that runs powershell.exe) How is this done? Thank you.
  2. Wait..... I just discovered something that is causing this. The following REG keys are NOT present. hklm:\SOFTWARE\Microsoft\MPSD\OSD Now we are using UDI to throw up custom dialogs during the OSD process. One of these is called NEW COMPUTER DETAILS and on this page I added custom OU's to add machines too. Again, I know 100% for sure this reg key used work and it entered data into the registry. For 2 years we would build machines and they would show up in the right OU and have the AD Machine Description set to whatever was entered into the UDI dialogs. Then we upgraded to CM2012 1602 and the issues began. 1) I looked in the UDI wizard and I don't see any variable name for the OU. What is it called? 2) where in the Task Sequence does this registry key get installed? I've looked at every line and I don't see it. And yes it used to work Thank you.
  3. Hi, I have a PowerShell script that used to work before we upgraded to CM2012 1602. Now it no longer works and I've tried many many different things to make it work. I have tried (that I got from this site) to create a Package that has no Program. That does not work. I have called a CMD and use -bypass etc..... that does not work. I have tried to run a PowerShell script and choose Bypass and that does not work. I have tried to place my .PS1 file in the %scriptroot% on our MDT share and that does not work. How on earth can I run the following .PS1 script from within a CM2012 Task Sequence so it works? (this script updates the AD description, moves the PC and moves the users ID if needed. YES, all of the registry entries are there and contain data). import-module -Name C:\windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Management -verbose ########################################################################################### # Update the description field $computer = (get-ItemProperty hklm:\SOFTWARE\Microsoft\MPSD\OSD).OSDComputerName $Description = (get-ItemProperty hklm:\SOFTWARE\MGH).Description $dom = [system.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() $root = $dom.GetDirectoryEntry() $search = [system.DirectoryServices.DirectorySearcher]$root $search.Filter = "(cn=$computer)" $result = $search.FindOne() $computerToUpdate = [ADSI]$result.path $computerToUpdate.Description = $description $computerToUpdate.SetInfo() ########################################################################################### # Move the computer to the correct OU $computer = (get-ItemProperty hklm:\SOFTWARE\Microsoft\MPSD\OSD).OSDComputerName $GetOU = (get-ItemProperty hklm:\SOFTWARE\Microsoft\MPSD\OSD).OSDDomainOUName $dom = [system.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() $root = $dom.GetDirectoryEntry() $search = [system.DirectoryServices.DirectorySearcher]$root $search.Filter = "(cn=$computer)" $result = $search.FindOne() $computerToMove = [ADSI]$result.path $computerToMove.psbase.Moveto([ADSI]"LDAP://$GetOU") ########################################################################################### # Move the users account $GetUserID = (get-ItemProperty hklm:\SOFTWARE\MGH).User $GetOU = "OU=MGH_Users,DC=acme,DC=org" $dom = [system.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() $root = $dom.GetDirectoryEntry() $search = [system.DirectoryServices.DirectorySearcher]$root $search.Filter = "(samaccountname=$GetUserID)" $result = $search.FindOne() $UserToMove = [ADSI]$result.path $UserToMove.psbase.Moveto([ADSI]"LDAP://$GetOU")
  4. I built a new secondary site server. It is running SCCM 2007 R3. I have checked and doubled checked that all perms are setup correctly and it has all the things it needs. IIS, BITS, remote diff compression, WebDav, R3. And the machine account has rights to the parent site DB and the machine account is a member of the needed AD groups to give it Admin rights on all required servers. In fact this secondary site is setup exactly like our other secondary sites (which all work) Each time I try to F12 a machine I get PXE-MOF Exiting Intel PXE ROM OS not found error. I've looked at the logs on the secondary site and they all say PXE is working properly. I looked in the System Status Messages and I see this over and over. The SMS PXE Service Point encountered an unknown device. Device MAC Address:00:50:56:A7:01:27 SMBIOS GUID:3EA72742-0A8C-D55A-2C66-BB20A72C145A. I've checked with our network team and they said everything is enabled on their end for DHCP to handle PXE requests. What am I missing or where else should I look?
  5. I get the same error when I run my TS Failed to run the action: Prepare Windows for Capture. The request is not supported. (Error: 80070032; Source: Windows) I created a Boot Media and run all of this from a WinPE DVD. How do you get by this error.
  6. Yes, I did a Capture Boot Media too. That seems to be the only way. But it still dies. Can you post your Capture Task Sequence? here is mine. Am I missing anything? <?xml version="1.0"?> <SmsTaskSequencePackage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <BootImageID>NA1000B4</BootImageID> <Category /> <DependentProgram /> <Description /> <Duration>360</Duration> <Name>z_Capture8200</Name> <ProgramFlags>152084496</ProgramFlags> <SequenceData> <sequence version="3.00"> <group name="Error Catching Top" description=""> <group name="Capture 8200" description=""> <step type="SMS_TaskSequence_PrepareOSAction" name="Prepare Windows for Capture" description="" runIn="FullOS" successCodeList="0"> <action>osdprepareos.exe /activate:%OSDKeepActivation% /bmsd:%OSDBuildStorageDriverList%</action> <defaultVarList> <variable name="OSDBuildStorageDriverList" property="BuildStorageDriverList">false</variable> <variable name="OSDKeepActivation" property="KeepActivation">false</variable> </defaultVarList> </step> <step type="SMS_TaskSequence_CaptureSystemImageAction" name="Capture Operating System Image" description="" runIn="WinPE" successCodeList="0"> <action>osdcapturesystemimage.exe</action> <defaultVarList> <variable name="OSDCaptureDestination" property="CaptureDestination">\\OurServer\d$\WIM\Windows 7\hp8200fat.wim</variable> <variable name="OSDCaptureAccountPassword" property="CapturePassword"> </variable> <variable name="OSDCaptureAccount" property="CaptureUsername">na\MyAdminID</variable> <variable name="OSDImageCreator" property="ImageCreator"> </variable> <variable name="OSDImageDescription" property="ImageDescription"> </variable> <variable name="OSDImageVersion" property="ImageVersion"> </variable> </defaultVarList> </step> </group> </group> <group name="Error Catching Bottom" description=""> <step type="SMS_TaskSequence_ConnectNetworkFolderAction" name="Connect to Network Folder" description="" runIn="WinPEandFullOS" successCodeList="0"> <action>smsnetuse.exe %SMSConnectNetworkFolderPath%</action> <defaultVarList> <variable name="SMSConnectNetworkFolderDriveLetter" property="DriveLetter">O:</variable> <variable name="SMSConnectNetworkFolderPassword" property="Password"> </variable> <variable name="SMSConnectNetworkFolderPath" property="Path">\\OurServer\d$\TSErrorLogs</variable> <variable name="SMSConnectNetworkFolderAccount" property="Username">na\MyAdminID</variable> </defaultVarList> </step> <step type="SMS_TaskSequence_RunCommandLineAction" name="create log folder for target machine" description="" runIn="WinPEandFullOS" successCodeList="0 3010"> <action>smsswd.exe /run: cmd.exe /c md O:\%_SMSTSMACHINENAME%</action> <defaultVarList> <variable name="CommandLine" property="CommandLine" hidden="true">cmd.exe /c md O:\%_SMSTSMACHINENAME%</variable> <variable name="SMSTSDisableWow64Redirection" property="DisableWow64Redirection">false</variable> <variable name="_SMSTSRunCommandLineAsUser" property="RunAsUser">false</variable> <variable name="SuccessCodes" property="SuccessCodes" hidden="true">0 3010</variable> </defaultVarList> </step> <step type="SMS_TaskSequence_RunCommandLineAction" name="copy logs to folder" description="" runIn="WinPEandFullOS" successCodeList="0 3010"> <action>smsswd.exe /run: cmd.exe /c copy %_SMSTSLOGPATH%\*.* O:\%_SMSTSMACHINENAME%</action> <defaultVarList> <variable name="CommandLine" property="CommandLine" hidden="true">cmd.exe /c copy %_SMSTSLOGPATH%\*.* O:\%_SMSTSMACHINENAME%</variable> <variable name="SMSTSDisableWow64Redirection" property="DisableWow64Redirection">false</variable> <variable name="_SMSTSRunCommandLineAsUser" property="RunAsUser">false</variable> <variable name="SuccessCodes" property="SuccessCodes" hidden="true">0 3010</variable> </defaultVarList> </step> </group> </sequence> </SequenceData> <SourceDate>2011-12-01T09:11:41</SourceDate> <SupportedOperatingSystems /> <IconSize>0</IconSize> </SmsTaskSequencePackage>
  7. I did read this link: http://technet.microsoft.com/en-us/library/bb632465.aspx and it says the machine can not be joined to a domain. And since my machine is not part of a domain it never ran an inventory so it does not show up in any colllection. In fact, in the Configuration Manager icon in control panel I only see 2 things under the Actions Tab (machine policy and user policy retrieval) So how do you capture this machine when its not part of the domain?
  8. I am trying to create a .WIM file that I can capture and then send off to a vendor. I ran a task sequence that installed the Windows 7 OS and some applications but I Disabled the "join network". I then made some Mods to the machine that needed to be done for the vendor. So the machine is in a workgroup. When I log onto the target machine I notice that the Configuration Manager icon in Control Panel is Not assigned to a Site. And if I pick "discover" it fails. I assume this is because it is not part of a domain? And if it's not assigned to a site how can I capture the machine into a .wim file? I need to capture it while it is NOT part of a domain. And this is using SCCM 2007 R3 Thanks.
×
×
  • Create New...