Closed perfectly-preserved-pie closed 3 years ago
@shift-faced The webpage will be blank if there have been no Task Sequence steps executed. i.e. Has someone imaged a computer yet?
Verify your TaskSequenceID and run line 269 manually. Does it retrieve the steps from the Task Sequence?
@shift-faced The webpage will be blank if there have been no Task Sequence steps executed. i.e. Has someone imaged a computer yet?
That's good to know. There wasn't anyone imaging, but there is now and it's still blank.
Verify your TaskSequenceID and run line 269 manually. Does it retrieve the steps from the Task Sequence?
Yes, it retrieves all the steps from the correct task sequence. I'm guessing that TaskSequenceID is the same as the PackageID? If so, then I have it set correctly.
You are correct, the TaskSequenceID is the PackageID. When you manually run the script, does it still give you errors (now that someone has imaged)?
After you run it is the $Messages variable empty? i.e. "Write-Host $Messages"
@shift-faced Also, can you send a screenshot of your task sequence steps from the sccm console?
You are correct, the TaskSequenceID is the PackageID. When you manually run the script, does it still give you errors (now that someone has imaged)?
Yep, still the same errors.
After you run it is the $Messages variable empty? i.e. "Write-Host $Messages"
$Messages does return output.
Here's a screenshot of my TS... had to redact some stuff but hopefully you get what you need.
I'll try to dig in this deeper but off the top of my head my guess would be that the Get-CMTaskSequenceStepApplyDriverPackage does not work with "Modern Driver Management." Can you manually run line 270 and see if you are getting any steps listed for the $TSDriverSteps variable?
Ahh you're on to something I think. Manually running line 270 does not return any output or steps for the $TSDriverSteps variable.
Is there a workaround? Can I just comment out the lines mentioning the drivers? Lines 270-277?
I've added some logic to workaround (hopefully) the MDM. Use the code in branch "Ver2.3" and add "-MDM $True" to your parameters. Report back on the results.
No dice; I'm still getting a blank gray page. When I execute the script from the 2.3 branch manually, I no longer receive any errors (or any output at all).
Questions: Did you add the MDM parameter and set it to true when manually running it?
Are the steps retrieved? By that I mean, can you check to see that both $TSStepsNoDrivers and $TSSteps contain the same data, i.e. the TS steps? I'm looking at line 285, for reference. Can you send me a screenshot of the output?
Verify computers have been imaging, i.e. does the $Messages variable contain data? Can you send me a screenshot of the output?
Questions: Did you add the MDM parameter and set it to true when manually running it?
Yes I did.
Are the steps retrieved? By that I mean, can you check to see that both $TSStepsNoDrivers and $TSSteps contain the same data, i.e. the TS steps? I'm looking at line 285, for reference. Can you send me a screenshot of the output?
Yep, both variables contain the same data (TS steps):
Verify computers have been imaging, i.e. does the $Messages variable contain data? Can you send me a screenshot of the output?
$Messages doesn't return any output even though I have one VM being imaged right now.
Does $SMSMSGSLocation contain data? (Lines 67-74).
And can you verify that the 3 files exist in that location "svrmsgs.dll", "provmsgs.dll", and "climsgs.dll"
Yup:
PS MDR:\> $SMSMSGSLocation
C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\00000409
PS MDR:\> cd $SMSMSGSLocation
PS C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\00000409> ls
Directory: C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\00000409
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 3/10/2021 9:42 AM 73080 baserc.dll
-a---- 3/10/2021 9:42 AM 208248 climsgs.dll
-a---- 3/10/2021 9:42 AM 44408 CmRcViewerRes.dll
-a---- 3/10/2021 9:42 AM 46440 compmgrres.dll
-a---- 3/10/2021 9:42 AM 148344 provmsgs.dll
-a---- 3/10/2021 9:42 AM 968552 srvmsgs.dll
-a---- 3/10/2021 9:42 AM 146296 _statvw.dll
We'll start higher and work down to more granular. $StatusMessages variable have any data?
If not, we are not receiving data from the database. That could mean the other variables are off (did the advertisement ID change?) or connection issues to the database. Double check the parameters.
Ok, it might have something to do with the TS Advertisement ID. I have my TS deployed to 3 different collections:
FYI, "OSD" is a collection that contains both "All Windows Workstations" and "All Unknown Computers".
Which one should I be using for this script?
You would use whichever advertisement ID you are wanting to monitor. If OSD contains both of the other two you should be able to just use that advertisement ID. Is that what you were using?
Yeah, I was using the OSD collection (SMS20040). $StatusMessages didn't return any output.
Try one-at-a-time swapping out with the other two and check the results. I can work on some logic to handle passing multiple advertisement IDs to give results of different deployments.
I've created version 2.4 and have introduced the ability to process multilple TSAdvertisementIDs and logic to display on the webpage if there is an issue pulling data/running the query or if no devices were found to be imaging.
@shift-faced What's the status?
Closing issue due to no response
I followed the detailed guide.
Here is my Task Scheduler parameters:
-NoProfile -ExecutionPolicy Bypass -File "E:\Sources\OSD\Scripts\OSDReporting.ps1" -SQLServer "uswc01.ad.com" -Database "CM_WCE" -TSAdvertisementID "WCE2003E" -TaskSequenceID "WCE001E7" -IISPath "C:\inetpub\OSD"
USCWC01.ad.com is the actual hostname of the server; however I have a CNAME that redirects osd.sccm.uswc01.ad.com to USWC01.ad.com. I would like to use osd.sccm.uswc01.ad.com for this webpage.
Browsing to osd.sccm.uswc01.ad.com:80 results in a blank page in Firefox and Edge. However, the custom favicon displays in the tab (the little home icon). Any ideas why this page isn't populating?
If I manually run the PS1 script and type in the parameters, I get these errors: