Found reason for wmic
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/ba-p/4039242
Is not enabled anymore by default
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hey, I am deploying 23H2 without any issues. Now I imported 24H2 (Pro & Enterprise IoT) and a lot of my task sequences does not work anymore.
Running a powershell from the task sequence cannot find cmdlets, which are working when I manually run the powershell on the system.
eg. I can run
Add-AppxPackage -Path "C:\Winget\Enterprise\Microsoft.VCLibs.x64.14.00.Desktop.appx" from the powershell manually, but same command out of a task sequnce (which is calling a powershell script):
Add-AppxPackage : Der Typeninitialisierer für "<Module>" hat eine Ausnahme verursacht.
In
\server.deployment\DeploymentShare\Scripts\05_InstallWingetMDT4ENT.ps1:23 Zeichen:5
+ Add-AppxPackage -Path "C:\Winget\Enterprise\Microsoft.VCL ...
+ ~~~~~~~~~~~~~~~
*+ CategoryInfo : NotSpecified: (:) [], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException*
Logging this is resulting in:
*`Add-AppxPackage : Der Typeninitialisierer für "<Module>" hat eine Ausnahme verursacht.`*Add-AppxPackage : Der Typeninitialisierer für "<Module>" hat eine Ausnahme verursacht.
*In \\server.deployment\DeploymentShare\Scripts\05_InstallWingetMDT4ENT.ps1:23 Zeichen:5*
*+ Add-AppxPackage -Path "C:\siemens\Winget\Enterprise\Microsoft.VCL ...*
*+ ~~~~~~~~~~~~~~~*
*+ CategoryInfo : NotSpecified: (:) [], TypeInitializationException*
*+ FullyQualifiedErrorId : System.TypeInitializationException*
*Der Typeninitialisierer für **"WinRT.Projections"** hat eine Ausnahme verursacht.*
Same for Get-AppxPackage.
In powershell it gets a result from a task sequence:
$installedPackages = Get-AppxPackage -AllUsers`*$installedPackages = Get-AppxPackage -AllUsers
+ ~~~~~~~~~~~~~~~]LOG]!><time="08:13:15.000+000" date="10-24-2024" component="TaskSequencePSHost" context="" type="3" thread="" file="TaskSequencePSHost">
![LOG[NotSpecified: (:) [], TypeInitializationException]LOG]!><time="08:13:15.000+000" date="10-24-2024" component="TaskSequencePSHost" context="" type="3" thread="" file="TaskSequencePSHost">*
Also tried in one task sequence to run cmdline to set adminstrator password to be expired.
wmic useraccount where name='Administrator' set Passwordexpires=true
wmic is not know to 24H2 at all
*`wmic useraccount where name='Administrator' set PasswordExpires=true`*wmic useraccount where name='Administrator' set PasswordExpires=true
*`wmic : Die Benennung "wmic" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines`*wmic : Die Benennung "wmic" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
*ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern*
*enthalten), und wiederholen Sie den Vorgang.*
*In Zeile:1 Zeichen:1*
*+ wmic useraccount where name='Administrator' set PasswordExpires=true ...*
*+ ~~~~*
*+ CategoryInfo : ObjectNotFound: (wmic:String) [], CommandNotFoundException*
*+ FullyQualifiedErrorId : CommandNotFoundException*
--> But
net user administrator /logonpasswordchg:yes
does work.
Same for Get-WindowsCapability.... --> COMException
Does anyone else see similar problems ? I used 24H2 ISO Image from 09.2024 also included CU 10.2024
Not seeing any of these problems in 23H2.
Thanks for your feedback
Chris
Found reason for wmic
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/ba-p/4039242
Is not enabled anymore by default
Hi,
Thank you for posting in Microsoft Q&A forum.
1,Have you integrated MDT with SCCM? MDT doesn't officially support Windows 11 and Windows Server 2022 operating systems. It's recommended to use SCCM to deploy Windows 11 to client computers. Refer to:
Support for Windows 11 in Configuration Manager
2,Please check the smsts.log and bdd.log to see if there is any further information. Similar thread for your reference:
MDT and Win11 24H2 - End of the line ?
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi,
Thank you very much for your feedback and sharing.
We're glad that the question is solved now. It's appreciated that you could click "Accept Answer" to the helpful answer. It may help others who have similar issue. If you have any questions in future, we warmly welcome you to post in Microsoft Q&A forum again.
Have a nice day!
Best Regards,
Simon