Resources for IT Professionals >
System Center Configuration Manager Forums
>
Configuration Manager Desired Configuration Management
>
Powershell validation rules evaluation error
Powershell validation rules evaluation error
- I've got a bit of a strange one......about 10% of my targeted server population are returning evaluation errors only on Powershell validation rules. The DCM agent works fine with all other rules (about 150 of them). The rul works fine on the remailing 1200 targeted servers. The servers in question are running the script just fine manaully but somehow it fails when ConfigMgr runs the script. This is happening on various servers. I see particularly see it on alot of servers running Citrix with Win2K3 and Win2K8. I have also seen the issue of a few servers not running Citrix as well.
Discovery.log returns these errors:
3/28/2009 4:58:55 AM DiscoveryProvider:Discovery Function none(): The interoperation method 'OpenProcessToken' returned Win32 error '0x000003F0(1008)' message ''.
3/28/2009 4:58:55 AM DiscoveryProvider:Discovery Function none(): The interoperation method 'AdjustThreadPrivilege' returned Win32 error '0x000003F0(1008)' message ''.
3/28/2009 4:58:55 AM SchematronValidator:There we no elements found for context query: smlfn:deref(.)/ns_ClonedCI_34bfc0e6-a73d-4f9a-b570-3dd13c54c677_this:File_388dd0ef-135f-4e20-abec-4996ce0d053a/fs:Version
3/28/2009 4:58:55 AM SchematronValidator:There we no elements found for context query: smlfn:deref(.)/ns_ClonedCI_34bfc0e6-a73d-4f9a-b570-3dd13c54c677_this:RegSetting_f7a8ff44-7bf4-4e6b-8603-afc3e6be2874
3/28/2009 4:58:55 AM SchematronValidator:There we no elements found for context query: smlfn:deref(.)/ns_ClonedCI_34bfc0e6-a73d-4f9a-b570-3dd13c54c677_this:RegSetting_e0b24268-25c7-42bb-add3-fd07417c67e7
PS code is as follows:
#Script ensures that either Director or SIM is present. Modified 18-Mar-09 by DD.
$strComputer = "."
$colItems = (get-wmiobject -class "Win32_BIOS" -namespace "root\CIMV2" -computername $strComputer)
foreach ($objItem in $colItems)
{
#$ErrorActionPreference = 'SilentlyContinue'
If ($objItem.Manufacturer -eq 'IBM')
{$DIR = (Get-Item "HKLM:\SOFTWARE\IBM\IBM Director Agent\CurrentVersion")
$DIR64 = (Get-Item "HKLM:\SOFTWARE\Wow6432Node\IBM\IBM Director Agent\CurrentVersion")}
If (($objItem.Manufacturer -eq 'Compaq') -or ($objItem.Manufacturer -eq 'HP'))
{$SIM = (Get-ChildItem "$env:SystemRoot\system32\CpqMgmt\cqmgserv\cqmgserv.exe")}
If (($DIR -notlike "") -or ($DIR64 -notlike "") -or ($SIM -notlike ""))
{Write-Host "Set Correctly"}
else
{Write-Host "Not Set Correctly"}
On the server I get a "Set Correctly" returned.
Here's another:
#Script gets the execution policy setting.
$ErrorActionPreference = 'SilentlyContinue'
$ExPol = (Get-ExecutionPolicy)
If (($ExPol -like "RemoteSigned") -or ($ExPol -like "Unrestricted"))
{Write-Host "Set Correctly"}
else
{Write-Host "Not Set Correctly"}
Again...I get a "Set correctly" response when running the script on the boxes in question.
Anyone seeing anything similar to my problem? Any help is appreciated.