-
Posts
94 -
Joined
-
Last visited
-
Days Won
1
Posts posted by kevlar01
-
-
Thanks for your quick reply Anyweb. Unfortunately the script has no logging of itself.
Below is a snippet from the smsts.log of a computer rolled out a while ago (the issue was existing at that time).
Quote============================== [ OSDRunPSScript.exe ] ============================== RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Running module version 5.0.9058.1000 from location 'C:\WINDOWS\CCM\OSDRunPowerShellScript.exe' RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Package ID containing the PowerShell script is REF000B0 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
PowerShell script name is SetComputerDesc.ps1 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
The execution scope for running the PowerShell script is specified not to verify the signature of the scripts. This is unsafe and potentially risk running malicious scripts. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Sending warning status message RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Setting URL = xxx, Ports = 80,443, CRL = false RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Setting Server Certificates. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Setting Authenticator. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Setting Media Certificate. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Sending StatusMessage RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Setting the authenticator. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
CLibSMSMessageWinHttpTransport::Send: WinHttpOpenRequest - URL: xxxx:80 CCM_POST /ccm_system/request RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Not in SSL. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Request was successful. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Running PowerShell script: 'SetComputerDesc.ps1'(PkgID: REF000B0) with execution policy: 'Bypass' RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Getting linked token RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
failed to get the linked token information. It may not be available. Error 1312 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Get RunAs private desktop SMSTS-201640\SMSTSDesktop RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Will run PowerShell script under USER account 'xxx\SVC_SCCM_DomainJoin' RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
PowerShell path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
ResolveSource flags: 0x00000000 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
SMSTSPersistContent: . The content for package REF000B0 will be persisted RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
The package REF000B0 is found locally in the cache C:\_SMSTaskSequence\Packages\REF000B0 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Resolved source to 'C:\_SMSTaskSequence\Packages\REF000B0' RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Working dir 'C:\_SMSTaskSequence\Packages\REF000B0' RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Command line for extension .exe is "%1" %* RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Set command line: Run PowerShell Script RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
PowerShell command line is NOT shown in the log ('OSDLogPowerShellParameters' is NOT set to 'True') RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Executing command line: Run PowerShell Script with options (0, 4) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Create a process under given user token RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
CreateProcessAsUser( m_hUserToken, NULL, (LPWSTR)m_sCommandLine.c_str(), NULL, NULL, TRUE, bNT ? CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT : CREATE_NEW_CONSOLE, m_pEnvironmentBlock, pszWorkingDir, &si, &pi ), HRESULT=8007010b (X:\bt\1022896\repo\src\Framework\Core\CCMCore\CommandLine.cpp,1052) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
CreateProcessAsUser failed. Code(0x8007010B) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Command line execution failed (8007010B) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
clCommandLine.Execute(uOptions, pszWorkingDir, lpDesktop), HRESULT=8007010b (X:\bt\1204713\repo\src\client\OsDeployment\RunPSScript\main.cpp,517) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Failed to execute PowerShell command line RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
ReleaseSource() for C:\_SMSTaskSequence\Packages\REF000B0. RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
reference count 1 for the source C:\_SMSTaskSequence\Packages\REF000B0 before releasing RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Released the resolved source C:\_SMSTaskSequence\Packages\REF000B0 RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
ExecutePowerShellScript(sScriptName, sParameters, sPackageID, sExecutionPolicy, sOutputVariableName, dwPSRunExitCode), HRESULT=8007010b (X:\bt\1204713\repo\src\client\OsDeployment\RunPSScript\main.cpp,944) RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Run PowerShell script failed to run, hr=0x8007010b RunPowerShellScript 24-11-2021 15:39:01 2992 (0x0BB0)
Process completed with exit code 2147942667 TSManager 24-11-2021 15:39:01 4584 (0x11E8)
!--------------------------------------------------------------------------------------------! TSManager 24-11-2021 15:39:01 4584 (0x11E8)
Failed to run the action: Set Computer Description - xxx. Error -2147024629 TSManager 24-11-2021 15:39:01 4584 (0x11E8)
-
Hi,
Since a while we have problems with a step during our Windows 10 task sequence. This step is a powershell script which changes the computer description based on a variable which is set during the OSDMenu.hta (a form which pops up in the beginning of the task sequence where the computerdescription is filled out).
For whatever reason, this step doesn't work anymore, but in the past this worked fine.
The computerdescription isn't too long (more than 15 characters), and the user which is used in this step has sufficient rights. I have also tested it with a domain admin account but it didn't make any difference. We also have a step which sets the computername but this is no issue.
The script which is used is the following:
Quote# Script to set the Computer description in AD for the computer on which it is executed from.
# Example Command line Powershell.exe -Set-ExecutionPolicy bypass -file .\SetComputerDesc "Computer Description"[string]$Description = $args[0]
try {
$ComputerDn = ([ADSISEARCHER]"sAMAccountName=$($env:COMPUTERNAME)$").FindOne().Path
$ADComputer = [ADSI]$ComputerDn
$ADComputer.description = $Description
$ADComputer.SetInfo()}
catch {
$_.Exception.Message ; Exit 1
}I have created a status message query for the task sequence and the error stated says it is an 'Incorrect function'
QuoteThe task sequence execution engine failed executing the action (Set Computer Description) in the group (Windows 10 customization) with the error code 1
Action output: ... VerifyContentHash: Hash algorithm is 32780
Content successfully downloaded at C:\_SMSTaskSequence\Packages\REF000B0.
Resolved source to 'C:\_SMSTaskSequence\Packages\REF000B0'
Command line for extension .exe is "%1" %*
Set command line: Run command line
Working dir 'C:\_SMSTaskSequence\Packages\REF000B0'
Executing command line: Run command line with options (0, 4)
Create a process under given user token
Process completed with exit code 1
Exception calling "FindOne" with "0" argument(s): "Onbekende fout (0x80005000)"
Command line is being logged ('OSDDoNotLogCommand' is not set to 'True')
Command line powershell.exe -NoProfile -ExecutionPolicy ByPass -File SetComputerDesc.ps1 "Voorraad" returned 1
ReleaseSource() for C:\_SMSTaskSequence\Packages\REF000B0.
reference count 1 for the source C:\_SMSTaskSequence\Packages\REF000B0 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\REF000B0
Exception calling "FindOne" with "0" argument(s): "Onbekende fout (0x80005000)". The operating system reported error 1: Incorrect function.Anyone else which has this problem?
-
You could try this Powershell command:
Get-PhysicalDisk | Select FriendlyName,MediaType,DeviceID
The mediatype should report back with 'SSD' or HDD'. Maybe you can build in a condition in the step to only run if it is an SSD.
edit: in this blog somebody created a more extended script: https://www.vacuumbreather.com/index.php/blog/item/72-dynamically-select-ssd-drive-for-os-installation. It is made for MDT but it looks like it should also work for SCCM.
-
Create a device collection with computers where you want to keep Chrome.
You can exclude this collection when you target your uninstallation deployment.
The collection with Chrome users can be maintained manually or based on an AD group for instance (computer is member of security group 'ChromeUsers' or something similar)
-
What happens if you run the script manually on the computer?
Can you publish it as available instead of required?
What does the script do? Perhaps it cannot run because it needs to kill a process of some other software first? -
Yeah it's pretty complicated stuff. I was planning to follow the next blogs, as we are planning to setup HTTPS in our own environment, so I'm curious thanks again.
-
Thanks for making this.
This made PKI a less tough cookie to crack for me
- 1
-
Checked the value in the registry, it does it exist.
However, it points to C:\Program Files\Microsoft Configuration Manager\AdminConsole.
This directory doesn't exist, so that may be the issue.
- 1
-
The error was the following:
Starting script...
Import-Module : Cannot bind argument to parameter 'Name' because it is null.Looks like it cannot use or import the Posh CM module or something....
-
Thanks for this!
Note: it worked for me when I started Powershell ISE via the Configuration Manager Console.
http://eddiejackson.net/SCCM/sccm_ps_1.png
Running the 'regular' Powershell ISE didn't work for me.
-
Good to hear that you've managed to get it working.
Perhaps the image got corrupted due to offline servicing of Windows updates within the image? Something must have touched the image, making it corrupt.
-
Perhaps there is a neighboring file server where you can put those files? Instead of injecting them back into the iso file.
-
Possibly it is something particular to this image.
You can also try to rebuild the task sequence from scratch to make sure that is the problem. Fortunately there aren't very much steps.
However, when I search for the error (0x80070002) in your log, it brings me to this site:
https://prajwaldesai.com/task-sequence-failed-error-code-0x80070002/
It states that possibly something is wrong with your NAA (Network Access Account). Perhaps password expired or wrong?
-
You could try to redistribute the content for the image.
Otherwise, you can also try to deploy a standard wim file (the original from the Windows DVD).
-
Can you try to add the option FSP=fqdn.of.yourserver in the installation properties?
-
Does the reboot after the 'Setup Windows and ConfigMgr' step go to the default installed OS or back to the boot image?
What happens if you disable the reboot step?
Can you post a screenshot of the task sequence steps? -
You could also check the deployment for errors in the SCCM console.
First, get the deployment ID of the deployment:
Go to the task sequence (Software Library -> Operating Systems -> Task Sequences)
Open the Deployments tab. Make sure the Deployment ID is enabled by rightclicking the columns)
Next:
Open Monitoring -> System Status -> Status Message Queries
Open 'All Status Messages for a Specific Deployment at a Specific Site'.
Fill out the Deployment ID, the Sitecode and the period to search (1hr or 6hrs should be OK).
Hopefully you can find the error here which is troubling you right now.
-
We use a package in our environment (don't use MDT, that's why).
1. copy the file microsoft-windows-netfx3-ondemand-package.cab from your install media to a folder on your SCCM server (sources folder)
2. Create a powershell script with the following code
Import-Module Dism $currentLocation = Split-Path -Parent $MyInvocation.MyCommand.Path; Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 -Source $currentLocation -LimitAccess -All
3. Create a package which invokes the ps1 script + the cab file (both in same folder)
Hopefully this works for you.
-
We are using gen 1 VM's, altough I've also tried gen 2.
The version of SCCM is 2016 / 1802.
Thanks for your efforts
-
-
We have trouble using PXE in our environment.
Our setup:
SCCM 2016 management point in remote datacentre (running on Windows Server 2016)SCCM 2016 distribution point + OSD in local serverroom (running on Windows Server 2016).
On this server, 2 network cards are configured. One is connected to the domain, the other is connected to a seperate 'installation LAN'.
We also configured DHCP on this server with a binding only to the 'installation LAN NIC'. We also configured DHCP options 60, 66 and 67.On this local server, we installed Hyper-V to run a virtual machine which we can use to create a clean Build and Capture using OSD.
However, we cannot boot this virtual machine into PXE. It doesn't seem to get an IP address from DHCP.
If we boot up a laptop to the installation LAN, then there is no issue booting up in to WinPE.
We've tried several things:
- Change WDS settings; (set PXE response to respond to all computers / Configured DHCP options / Authorized server in to DHCP / let DHCP give out the multicast address)
- Changed DHCP options (removed option 60 (PXEClient) / Configured DHCP option to also use BOOTP)
- Configured different virtual switches in Hyper-V (Internal / external / private), configured RRAS to create a shared NIC, disabled DCHP guard, disabled 'Protected Network'
- Added computer manually in to SCCM using MAC address.
We are running out of options. If I boot up a VM on the laptop using Hyper-V, I don't have any issues. However, we would like to use Hyper-V on the server itself to create images because it is a central and permanent solution.
Any suggestions? Many thanks in advance. -
-
-
What do you mean with streaming? App-V streaming? Or a multicast stream with OSD?
Computername doesn't change during task sequence
in System Center Configuration Manager (Current Branch)
Posted
Thanks, I will look in to that !