I have a deployment thats hitting a few thousand computers and i want to re-run the advertisement on the failures. For some reason when i run this tool it doesnt actually attempt to hit all the computers. My first thought was there was a default limit in powershell for i think 1000 devices. Is there an adjustment i can make to increase the item limit in the script? The tool seems to work fine on smaller deployments
There is no builtin limit that I know of in PowerShell - you may be thinking of the LDAP search limit that exists in Active Directory that many people hit with the AD cmdlets. Note that the initial launch screen relies on the summarization data to provide counts, while the tool itself relies on the most up to date deployment status. Is it possible you’re just seeing a difference there? To update the summarization data, you can right click on a deployment and choose Run Summarization:
The deployment is summarized and the data current, I am watching this deployment closely. The first window pops up and shows that i have 644 errors which matches the deployment summary. I select that i want to run against the Errors and the second screen comes up. It says please wait for a few minutes then says complete, but zero computers appear in the successful or unsuccessful category. I would put some screenshots in but the forum says i am a new user and thats prohibited. is there perhaps a timeout limit?
I timed the process and it appears to be exactly 5 minutes before it completes.
I updated your trust level so you should be able to upload screenshots. This sounds like a similar issue to the one posted here: Recast RCT Free 2.4 Release
There is an issue with WQL queries and joins for large numbers of results. In the 2.4 release we made the query a little larger to fix some of the nested right click tools menus, which triggered the problem for the person in that thread. I will be re-evaluating some of the queries with joins to see if we can get around this issue for the next release.
Cool thanks for that. I was on 2.4 but reverted back to 2.3 because of the problem with the numbers appending to computer names, theres another thread on that. Here are the screenshots
What type of deployment is this (application, package / program)? My guess is that even though you’re on the 2.3 release, you’re still hitting a WMI provider limit relating to the amount of data being returned.
Its an MSI application deployment
Could you try running the PowerShell below, changing the assignment ID, server, and site code variables to match your environment? You can find the assignment ID by going to the Deployments node in the ConfigMgr console, right clicking on the table header and adding the Assignment ID column.
$AssignmentID = "11111111" $server = "server" $siteCode = "ps1" $computers = Get-WmiObject -ComputerName $server -Namespace root\sms\site_$siteCode -Query "select Distinct Deploy.StatusType,SMS_R_System.Name from SMS_R_System inner join SMS_AppDeploymentAssetDetails As Deploy on Deploy.MachineID = SMS_R_System.ResourceID where Deploy.AssignmentID = '$AssignmentID' and Deploy.StatusType='5'" $computers.Count
It returned the number 448. The process ran very fast, it must have been well under a second
Could you run one more script, changing the assignment ID, server, and site code again? It’s mostly the same, just removing a condition so that it more closely matches what the tools run.
$AssignmentID = "11111111" $server = "server" $siteCode = "ps1" $computers = Get-WmiObject -ComputerName $server -Namespace root\sms\site_$siteCode -Query "select Distinct Deploy.StatusType,SMS_R_System.Name from SMS_R_System inner join SMS_AppDeploymentAssetDetails As Deploy on Deploy.MachineID = SMS_R_System.ResourceID where Deploy.AssignmentID = '$AssignmentID'" $computers.Count
It says quota violation. here is the whole output:
Get-WmiObject : Quota violation
At line:1 char:14
- … computers = Get-WmiObject -ComputerName $server -Namespace root\sms\s …
- CategoryInfo : InvalidOperation: ( [Get-WmiObject], ManagementException
- FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Thanks for running the script. It is an issue with the number of devices in your deployment - WMI has some built-in limitations as to how much data it can return. If you’re feeling ambitious, you can try increasing the limit on your SMS Provider server by following the steps in this blog post: http://blogs.technet.com/b/askperf/archive/2008/09/16/memory-and-handle-quotas-in-the-wmi-provider-service.aspx
I will look into making these queries more scalable in the next version.
Thanks for the tip. I was actually reviewing the exact same article and now that you suggested it I doubled the memory allocation for the per-user and per-machine settings. Those changes require a reboot so i scheduled that for this evening. Ill try it again tomorrow and see how it goes.
i increased my WMI memory limits. The default was 1gb quota total for the server and 512mb quota per-user and i increased that to 1gb quota per user. I still received the quota violation. In an attempt to find what the practical limit was i started rerunning other advertisements on failed clients. I have it working on up to 9,400 clients but my next highest group of targets is the one in question and it fails to run on 26,400 clients so somewhere between those two numbers is my limit. I guess its possible that i am using even more than 1gb of memory for this query; Chris do you know what the max values are for that WMI memory setting?
Update: I cranked the settings all the way to 3gb and the problem persists
I’m not aware of any limit to the WMI quotas, but I don’t know that one doesn’t exist. Thanks for testing the quotas - it sounds like we may not be able to work around it without changing the query itself. As a workaround, you could replace line 176 of Functions - Col Depl.ps1 with the following. Note that this will only allow you to evaluate failed deployments, so I would change it back when you’re done with the larger deployment.
$strquery = "select Distinct Deploy.StatusType,SMS_R_System.Name,SMS_R_System.FullDomainName,SMS_R_System.ResourceID from SMS_R_System inner join SMS_AppDeploymentAssetDetails As Deploy on Deploy.MachineID = SMS_R_System.ResourceID where Deploy.AssignmentID = '$AssignmentID' and Deploy.StatusType='5'"
I will try to make these queries more scalable in future versions.