Jump to content


gbrown135

Established Members
  • Posts

    5
  • Joined

  • Last visited

gbrown135's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. We have a large environment with 1 CAS, 4 Primaries, 16 MP's and over 700 DP's. We build our DP's in a build centre and then ship them to site to alleviate the WAN bandwith of building a DP across the WAN. Say we have buit several DP's a while ago. These have been switched off in shipping and can be for months at a time. In this time when they were off we have upgraded our environment from SCCM 2012 to SCCM 1702. We the have brought our DP's online a few months after the upgrade and now these DP's dont seem to be able to download any content that has been sent to their respective content groups in the time when they were switched off They are sitting there In Progress for these packages and apps that have been ditributed but they never gets there. You cant seem to force a redistribution or cance a distribution. My question is that during a SCCM Upgrade does anything happen to the DP's such as an upgrade or similar taht would enable the DP's to have content distributed to it? Is there anything I can run manually to get this working?
  2. Attached is my smsts.log It doesn't say anything at all it just sits there like that in a frozen state as though the script has run but isn't showing on the screen If I now open up a command prompt in WinPE I can run the script fine when I navigate to it smsts.log
  3. Hi No I'm running this in the TS Environment before a the OS Setup takes place, does this still apply at this stage of the TS?
  4. I am working for a company who is looking to create a new Windows 10 image. I have a powershell script that prompts for a Computer name and this all works fine by passing the OSDComputerName variable to the TS. I'm trying to introduce is another powershell script that will ask the user to select one of 2 domains. This is done by selecting one of 2 radio buttons in a Powershell Form called by a function. Whichever one is selected will create a custom TS variable and the variable will be passed on later to the Task Sequence and the correct Network Settings will be set dependent on which domain is selected. The problem is the Domain Select script doesn't seem to run as part of the TS and it just sits there. The code of the script is shown below -------------------------------------------------------------------------------------------------------------------------------------------- #Disable Task Sequence Progress Screen $tsui = New-Object -COMObject Microsoft.SMS.TSProgressUI $tsui.closeprogressdialog() # A function to create the form function Domain_Form{ [void] [system.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [system.Reflection.Assembly]::LoadWithPartialName("System.Drawing") # Set the size of your form $Form = New-Object System.Windows.Forms.Form $Form.width = 500 $Form.height = 300 $Form.Text = ”Please select domain" # Set the font of the text to be used within the form $Font = New-Object System.Drawing.Font("Times New Roman",12) $Form.Font = $Font # Create a group that will contain your radio buttons $MyGroupBox = New-Object System.Windows.Forms.GroupBox $MyGroupBox.Location = '40,30' $MyGroupBox.size = '400,150' $MyGroupBox.text = "Select PRIMARY or SECONDARY Domain" # Create the collection of radio buttons $RadioButton1 = New-Object System.Windows.Forms.RadioButton $RadioButton1.Location = '20,40' $RadioButton1.size = '350,20' $RadioButton1.Checked = $true $RadioButton1.Text = "PRIMARY" $RadioButton2 = New-Object System.Windows.Forms.RadioButton $RadioButton2.Location = '20,70' $RadioButton2.size = '350,20' $RadioButton2.Checked = $false $RadioButton2.Text = "SECONDARY" #$RadioButton3 = New-Object System.Windows.Forms.RadioButton #$RadioButton3.Location = '20,100' #$RadioButton3.size = '350,20' #$RadioButton3.Checked = $false #$RadioButton3.Text = "??" # Add an OK button # Thanks to J.Vierra for simplifing the use of buttons in forms $OKButton = new-object System.Windows.Forms.Button $OKButton.Location = '130,200' $OKButton.Size = '100,40' $OKButton.Text = 'OK' $OKButton.DialogResult=[system.Windows.Forms.DialogResult]::OK #Add a cancel button $CancelButton = new-object System.Windows.Forms.Button $CancelButton.Location = '255,200' $CancelButton.Size = '100,40' $CancelButton.Text = "Cancel" $CancelButton.DialogResult=[system.Windows.Forms.DialogResult]::Cancel # Add all the Form controls on one line $form.Controls.AddRange(@($MyGroupBox,$OKButton,$CancelButton)) # Add all the GroupBox controls on one line $MyGroupBox.Controls.AddRange(@($Radiobutton1,$RadioButton2,$RadioButton3)) # Assign the Accept and Cancel options in the form to the corresponding buttons $form.AcceptButton = $OKButton $form.CancelButton = $CancelButton # Activate the form $form.Add_Shown({$form.Activate()}) # Get the results from the button click $dialogResult = $form.ShowDialog() # If the OK button is selected if ($dialogResult -eq "OK"){ # Check the current state of each radio button and respond accordingly if ($RadioButton1.Checked){ $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $tsenv.Value("CustomDomain") = "PRIMARY"} elseif ($RadioButton2.Checked){ $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $tsenv.Value("CustomDomain") = "SECONDARY"} } } # Call the function Domain_Form -------------------------------------------------------------------------------------------------------------------------------------------- The task sequence progress bar disappears when it's run but thats about it and nothing else ever comes back up. The strange thing is if I run the script in a command prompt manually it runs OK Any help would be appreciated
  5. I am working for a company who is looking to create a new Windows 10 image. I have a powershell script that prompts for a Computer name and this all works fine by passing the OSDComputerName variable to the TS. I'm trying to introduce is another powershell script that will ask the user to select one of 2 domains. This is done by selecting one of 2 radio buttons in a Powershell Form called by a function. Whichever one is selected will create a custom TS variable and the variable will be passed on later to the Task Sequence and the correct Network Settings will be set dependent on which domain is selected. The problem is the Domain Select script doesn't seem to run as part of the TS and it just sits there. The code of the script is shown below -------------------------------------------------------------------------------------------------------------------------------------------- #Disable Task Sequence Progress Screen $tsui = New-Object -COMObject Microsoft.SMS.TSProgressUI $tsui.closeprogressdialog() # A function to create the form function Domain_Form{ [void] [system.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [system.Reflection.Assembly]::LoadWithPartialName("System.Drawing") # Set the size of your form $Form = New-Object System.Windows.Forms.Form $Form.width = 500 $Form.height = 300 $Form.Text = ”Please select domain" # Set the font of the text to be used within the form $Font = New-Object System.Drawing.Font("Times New Roman",12) $Form.Font = $Font # Create a group that will contain your radio buttons $MyGroupBox = New-Object System.Windows.Forms.GroupBox $MyGroupBox.Location = '40,30' $MyGroupBox.size = '400,150' $MyGroupBox.text = "Select PRIMARY or SECONDARY Domain" # Create the collection of radio buttons $RadioButton1 = New-Object System.Windows.Forms.RadioButton $RadioButton1.Location = '20,40' $RadioButton1.size = '350,20' $RadioButton1.Checked = $true $RadioButton1.Text = "PRIMARY" $RadioButton2 = New-Object System.Windows.Forms.RadioButton $RadioButton2.Location = '20,70' $RadioButton2.size = '350,20' $RadioButton2.Checked = $false $RadioButton2.Text = "SECONDARY" #$RadioButton3 = New-Object System.Windows.Forms.RadioButton #$RadioButton3.Location = '20,100' #$RadioButton3.size = '350,20' #$RadioButton3.Checked = $false #$RadioButton3.Text = "??" # Add an OK button # Thanks to J.Vierra for simplifing the use of buttons in forms $OKButton = new-object System.Windows.Forms.Button $OKButton.Location = '130,200' $OKButton.Size = '100,40' $OKButton.Text = 'OK' $OKButton.DialogResult=[system.Windows.Forms.DialogResult]::OK #Add a cancel button $CancelButton = new-object System.Windows.Forms.Button $CancelButton.Location = '255,200' $CancelButton.Size = '100,40' $CancelButton.Text = "Cancel" $CancelButton.DialogResult=[system.Windows.Forms.DialogResult]::Cancel # Add all the Form controls on one line $form.Controls.AddRange(@($MyGroupBox,$OKButton,$CancelButton)) # Add all the GroupBox controls on one line $MyGroupBox.Controls.AddRange(@($Radiobutton1,$RadioButton2,$RadioButton3)) # Assign the Accept and Cancel options in the form to the corresponding buttons $form.AcceptButton = $OKButton $form.CancelButton = $CancelButton # Activate the form $form.Add_Shown({$form.Activate()}) # Get the results from the button click $dialogResult = $form.ShowDialog() # If the OK button is selected if ($dialogResult -eq "OK"){ # Check the current state of each radio button and respond accordingly if ($RadioButton1.Checked){ $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $tsenv.Value("CustomDomain") = "PRIMARY"} elseif ($RadioButton2.Checked){ $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $tsenv.Value("CustomDomain") = "SECONDARY"} } } # Call the function Domain_Form -------------------------------------------------------------------------------------------------------------------------------------------- The task sequence progress bar disappears when it's run but thats about it and nothing else ever comes back up. The strange thing is if I run the script in a command prompt manually it runs OK Any help would be appreciated
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.