DAKHAMA MEHDI
Member
- Messages
- 5
- Reaction score
- 3
- Points
- 3
Hi family,
i have this error when i want creat a collection with powershell from OU
my code :
$OU_Name = 'info.prive/parc/users/disi'
New-CMUserCollection -LimitingCollectionName 'All Users' -Name $OU_Name -RefreshSchedule $Schedule -Comment $O_GUID
Add-CMUserCollectionQueryMembershipRule -CollectionName $OU_Name -QueryExpression "select * from SMS_R_USER where SMS_R_User.SystemOUName = '$O_Name'" -RuleName "OU Membership"
the error :
Au caractère C:\Users\mehdi\Downloads\sccmou.Run.ps1:287 : 4
ERROR: + Add-CMUserCollectionQueryMembershipRule -CollectionName $O_Name -QueryExpress ...
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : NotSpecified: (Microsoft.Confi...shipRuleCommand:AddUserCollecti...shipRuleCommand) [Add-CMUserCollectionQueryMembershipRule], W
ERROR: qlQueryException
ERROR: + FullyQualifiedErrorId : UnhandledException,Microsoft.ConfigurationManagement.Cmdlets.Collections.Commands.AddUserCollectionQueryMembershipRuleCommand
ERROR: Add-CMUserCollectionQueryMembershipRule : Objet d'erreur ConfigMgr :
ERROR: instance of SMS_ExtendedStatus
ERROR: {
ERROR: CauseInfo = "";
ERROR: Description = "Error waiting for query to return.";
ERROR: ErrorCode = 1078464258;
ERROR: File = "..\\sspobjectquery.cpp";
ERROR: Line = 5472;
ERROR: ObjectInfo = "select * from SMS_R_USER where SMS_R_User.SystemOUName = 'info.prive/parc/users/disi'";
ERROR: Operation = "ExecQuery";
ERROR: ParameterInfo = "select * from SMS_R_USER where SMS_R_User.SystemOUName = 'info.prive/parc/users/disi'";
ERROR: ProviderName = "WinMgmt";
ERROR: SQLMessage = "[42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Nom de colonne non valide : 'SystemOUName'.";
ERROR: SQLSeverity = 16;
ERROR: SQLStatus = 207;
ERROR: StatusCode = 2147749889;
ERROR: };
i have this error when i want creat a collection with powershell from OU
my code :
$OU_Name = 'info.prive/parc/users/disi'
New-CMUserCollection -LimitingCollectionName 'All Users' -Name $OU_Name -RefreshSchedule $Schedule -Comment $O_GUID
Add-CMUserCollectionQueryMembershipRule -CollectionName $OU_Name -QueryExpression "select * from SMS_R_USER where SMS_R_User.SystemOUName = '$O_Name'" -RuleName "OU Membership"
the error :
Au caractère C:\Users\mehdi\Downloads\sccmou.Run.ps1:287 : 4
ERROR: + Add-CMUserCollectionQueryMembershipRule -CollectionName $O_Name -QueryExpress ...
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : NotSpecified: (Microsoft.Confi...shipRuleCommand:AddUserCollecti...shipRuleCommand) [Add-CMUserCollectionQueryMembershipRule], W
ERROR: qlQueryException
ERROR: + FullyQualifiedErrorId : UnhandledException,Microsoft.ConfigurationManagement.Cmdlets.Collections.Commands.AddUserCollectionQueryMembershipRuleCommand
ERROR: Add-CMUserCollectionQueryMembershipRule : Objet d'erreur ConfigMgr :
ERROR: instance of SMS_ExtendedStatus
ERROR: {
ERROR: CauseInfo = "";
ERROR: Description = "Error waiting for query to return.";
ERROR: ErrorCode = 1078464258;
ERROR: File = "..\\sspobjectquery.cpp";
ERROR: Line = 5472;
ERROR: ObjectInfo = "select * from SMS_R_USER where SMS_R_User.SystemOUName = 'info.prive/parc/users/disi'";
ERROR: Operation = "ExecQuery";
ERROR: ParameterInfo = "select * from SMS_R_USER where SMS_R_User.SystemOUName = 'info.prive/parc/users/disi'";
ERROR: ProviderName = "WinMgmt";
ERROR: SQLMessage = "[42S22][207][Microsoft][SQL Server Native Client 11.0][SQL Server]Nom de colonne non valide : 'SystemOUName'.";
ERROR: SQLSeverity = 16;
ERROR: SQLStatus = 207;
ERROR: StatusCode = 2147749889;
ERROR: };