Status Filter Rules not applying ?
-
mardi 26 juillet 2011 19:36
Hello, I am using OSD to deploy Windows and created the 2 following Status Filter Rules :
- One that will send me an email via SMTP when a Task Sequence fails. It is triggered by Message ID # 11170 and will run a VBSscript that will send me a notifcation email...
- One that will automatically delete a computer from the Deployment collection after being imaged. It is triggered by Message ID # 11171 and runs a VBScript that deletes the computer object from the collection ID.
Both rules are on the top of the list of priorities and have « Report to the event log » checked. The first rule works fine. The second rule doesn't seem to work. If I run it manually, it works fine so it is not a script issue. I even get an eventlog entry saying that computer X will be deleted from collection Y and gets deleted. I check in the event log and when a computer is imaged, I see a message with ID 11171, meaning that the Task Sequence was successful but for some reason, that rule doesn't seem to apply (this rule is on the top of all the rules!)
Any idea on what/where I could check to know why it is not running? (I double checked the message ID, no typo there...)
Thanks for the help!
Toutes les réponses
-
mardi 26 juillet 2011 20:01Modérateur
I just saw someone else doing something similar last week. This guy is actually adding a script into the TS to handle sending the emails. He said it works well. I'll try to dig up that post.
John Marcum | http://myitforum.com/cs2/blogs/jmarcum/| -
mardi 26 juillet 2011 20:17John, are you talking about this post http://blog.danovich.com.au/2010/03/12/send-sccm-task-sequence-email-report/
Bechir Gharbi | http://myitforum.com/cs2/blogs/bgharbi/ | Time zone : GMT+1 -
mardi 26 juillet 2011 20:43Modérateur
The one I saw was on the myitforum.com SMS mailing list. I posted there and several people replied. I pointed them here. The one I saw added a script right into the TS. The script sent customized emails depending upon whether the TS failed or succeded.
John Marcum | http://myitforum.com/cs2/blogs/jmarcum/| -
mardi 26 juillet 2011 21:29
Johan blogged about doing this via MDT which can easily be done as well without MDT Integration just add the ZTIUtility.vbs script to your package and call the referenced script.
Thanks,
Brandon
Brandon Linton |http://myitforum.com/cs2/blogs/brandonlinton/default.aspx | MCTS - SCCM, MDT, AD -
mercredi 27 juillet 2011 12:07Modérateur
In my TS's I have a group called "Gather Logs and StateStore on Failure" Inside that group I perform a few tasks such as remoning the comptuer from the collection, clearing the last PXE advertisement and copying the deployment logs up to a share. All of those same actions are also performed in the State Restore group for successful deployments. It would be easy to use the steps outlined in Johans blog to send one type email for success and a different email for failures. Just place the send mail step in each of those groups.
John Marcum | http://myitforum.com/cs2/blogs/jmarcum/| -
mercredi 27 juillet 2011 18:40
Actually the problem is not about sending emails, this rule works
It is the one that is supposed to delete computers from the collection after they have been imaged? I see in the server logs that I imaged 3 laptops this morning and they have a 11171 entry in the event log saying that the Task Sequence completed successfully. But the status filter rules never triggered ? If I run it manually from the server for one computer, it gets deleted.
It is just that, for some reason, that rule doesnt seem to get triggered while the other rule (the one that sends email) is working? When a computer is imaged, a 11171 entry gets added to the eventlog but the rule associated with this entry never starts ? Any idea on what I could check on the server to find why this one is not running???
-
jeudi 28 juillet 2011 07:34
Hi,
When you "run it by hand" you are running it with your credentials, right? What happens if you run the vbscript under the SYSTEM context?
Have a look at this blog: http://blog.danovich.com.au/2010/03/12/remove-computer-association-from-collection-after-sccm-task-sequence/ it gives us a working script and status filter rule definition on event 11171.
Also take this as a reference: http://technet.microsoft.com/en-us/library/bb693758.aspx Command-Line Parameters for Status Filter Rules.
Hope this will help.
Thanks
-
vendredi 29 juillet 2011 12:42
I opened a cmd in Local System Context and ran the script manually and it worked...but again, it never gets triggered when an event 11171 is generated, while the send email, for 11170 works?
-
samedi 30 juillet 2011 19:20Modérateur
I opened a cmd in Local System Context and ran the script manually and it worked...but again, it never gets triggered when an event 11171 is generated, while the send email, for 11170 works?
replace the mail script on the failure rule with something that can easily run, or report to the event log, do they fail to trigger correctly too? -
vendredi 5 août 2011 18:18
Hmmm very weird.
The script that sends an email when an error occurs (Event ID 11170) works perfectly and every time. I copied this script (changed subject and description...) and assigned this to the status filter rules of a TS success (Event ID 11171) and it worked one time / 5 ? As you can see in the image joined, a successfull TS completed at 1:49:58 and 2 seconds later, the script ran. Then, 3 other successful TS were at 1:55, 1:57 and 1:58 but nothing got triggered ? Could it be that there are too many things running on the server and sometimes, the Status Filter rule doesn't run because the server is too busy running other stuff? (this Status Filter Rule is the first one on the top of the priorities...)...One thing though is that I know that hte script is working :) It just doesn't get triggered every time a 11171 event ID is generated :(
-
mercredi 10 août 2011 17:08
OK I found something interesting...it actually works for computers that already exist in SCCM (ie: If I select a computer from the the All Systems collection and add it to my Deployment collection, the script will run and the computer will get deleted)
It doesn't run for computers that have been imported (computers that are fresh out of the box from the manufacturer, that never been connected to our network).
Here's the script I run
Option Explicit
' Constants for type of event log entry
const EVENTLOG_INFORMATION = 4
Dim Args
Dim swbemLocator, SWbemServices, objCollection, oProviderLocation, oLocation
Dim strComputerName, arrComputers, objComputer, sCollectionIDs
Dim objDirectRule
Dim strmessage, objshell
Dim seventlog, sClearPxeflagOn Error Resume Next
'Should an eventlog entry be generated, set Seventlog=1
sEventlog = "1"'CollectionIDs from which to remove the computer
sCollectionIDs = "AAA00173"'------------------------------------------------------------
'Get Command Line argumentsSet args = WScript.Arguments
strComputername = args.Item(0)
If strComputerName = NULL then
If Seventlog = "1" then
strMessage = "Computer name seems to be null..."
objShell.LogEvent EVENTLOG_INFORMATION, strMessage
End IF
Wscript.quit
End if'------------------------------------------------------------
'Main scriptset objShell = CreateObject("WScript.Shell")
Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")
swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.
Set swbemServices = swbemLocator.ConnectServer(".", "root\SMS")
Set oProviderLocation = swbemServices.InstancesOf("SMS_ProviderLocation")
For Each oLocation In oProviderLocation
If oLocation.ProviderForLocalSite = True Then
Set swbemServices = swbemLocator.ConnectServer(oLocation.Machine, "root\sms\site_" + oLocation.SiteCode)
End If
NextSet arrComputers = SWbemServices.ExecQuery("select * from SMS_R_System where Name='" & strComputerName & "' and Obsolete = 0")
If Seventlog = "1" then
strMessage = "Status Filter rule script ran"
objShell.LogEvent EVENTLOG_INFORMATION, strMessage
End IFFor Each objComputer In arrComputers
RemoveCollectionMembership objComputer.ResourceID
'Write to eventlog if Seventlog = 1
If Seventlog = "1" then
strMessage = strcomputername & " will be removed from the following collection ID's " & scollectionids
objShell.LogEvent EVENTLOG_INFORMATION, strMessage
End IF
Next
Set objCollection = Nothing
Set SWbemServices = Nothing
Set SWbemLocator = Nothing
Wscript.Quit
'------------------------------------------------
Sub RemoveCollectionMembership(intresourceid)
on error resume nextDim mCollectionID, i
mCollectionID = Split (sCollectionIDs, ":")
for i = Lbound(mCollectionID) to UBound(mCollectionID)Set objCollection = SWbemServices.Get("SMS_Collection='" & MCollectionID(i) & "'")
Set ObjDirectRule = SWbemServices.Get("SMS_CollectionRuleDirect").SpawnInstance_
ObjDirectRule.ResourceID = intresourceid
ObjCollection.DeleteMembershipRule objDirectRule
next
End Sub'------------------------------------------------
WScript.Quit(0)
After checking back the script, I think the problem would be in that command
Set arrComputers = SWbemServices.ExecQuery("select * from SMS_R_System where Name='" & strComputerName & "' and Obsolete = 0")
So I added a simple entry to the event viewre ("Status filter ran") and it's there, but it doesn't seem to enter in the For right after ... like arrComputers would be null ?
Could it be possible that since I imported the computer, it doesn't exist in SMS_R_System. Is there a way I could check that ?
Thanks! -
mercredi 10 août 2011 18:21Modérateur
OK I found something interesting...it actually works for computers that already exist in SCCM (ie: If I select a computer from the the All Systems collection and add it to my Deployment collection, the script will run and the computer will get deleted)
It doesn't run for computers that have been imported (computers that are fresh out of the box from the manufacturer, that never been connected to our network).
After checking back the script, I think the problem would be in that command
Set arrComputers = SWbemServices.ExecQuery("select * from SMS_R_System where Name='" & strComputerName & "' and Obsolete = 0")
Could it be possible that since I imported the computer, it doesn't exist in SMS_R_System. Is there a way I could check that ?
Thanks!
I think it is there, try this wql query instead:select * from sms_r_system where name="<NAME>" and (obsolete = 0 or obsolete is null)
That should help you select the client record.
To check out sms_r_system, use WBEMTEST to connect to the site servers WMI namespace, click connect, root\sms\site_<YOUR SITE CODE>, click query, write a query and run it
- Marqué comme réponse Rob Marshall - MVPMVP, Moderator jeudi 7 juin 2012 08:43
-
mercredi 10 août 2011 18:57
SMS Marshall was right, my query wasn't good !
After I added obsolete = 0 or obsolete is null (so the query is now : select * from sms_r_system where name="<NAME>" and (obsolete = 0 or obsolete is null)), then it started to delete existing and imported computers
Many thanks!
- Marqué comme réponse Pierre-Luc R jeudi 11 août 2011 12:39
-
mardi 24 avril 2012 06:23
Hello,
I am trying to do the same as you're first rule (send me an email via SMTP when a Task Sequence fails) but i don't get a mail send out. When I run the VBscript manually it works but with the status filter rule it will not work. Is it possible the share you're first rule, so that I can use that ??
I hope you will...
thnx.
-
mercredi 6 juin 2012 14:00
Hi Pierre,
I ran into the same issue, but since i'm not a coder i got problems with the syntax and cannot get the script to work so it deletes the imported computers..
can you send me the hole script?
Thanks in advance..
Br Jens
-
vendredi 29 juin 2012 15:26
Hello Louis! Sorry for the delay in the answer... if you still need the info... I know your script is working fine since it works manually.
Here is what I ran in my status filter rule (I do this from memory since I did that in a previous job where I don't work anymore but I will need to implement this in the next few days where I work so I will confirm wether this is still good or not. In any case, you can try this and I am pretty sure this is the correct thing!)
The command line I ran for the status filter rule was CSCRIPT.EXE C:\SCRIPTS\SendEmail.vbs %msgsys
Message ID : 11170
Component : Task Sequence Manager (I think for some reason Task Sequence Manager was not available in the dropdown so I might have used Unknown Component or just ignored this setting...)
Hope this helps!
-
vendredi 29 juin 2012 15:29
Here you go :
Just replace what is in bold with your collection ID (not the name of the collection but the ID!)
Option Explicit
' Constants for type of event log entry
const EVENTLOG_INFORMATION = 4
Dim Args
Dim swbemLocator, SWbemServices, objCollection, oProviderLocation, oLocation
Dim strComputerName, arrComputers, objComputer, sCollectionIDs
Dim objDirectRule
Dim strmessage, objshell
Dim seventlog, sClearPxeflagOn Error Resume Next
'CollectionIDs from which to remove the computer
'Should an eventlog entry be generated, set Seventlog=1sEventlog = "1"
sCollectionIDs = "ENTER YOUR COLLECTION ID HERE!!!"'------------------------------------------------------------
'Get Command Line argumentsSet args = WScript.Arguments
strComputername = args.Item(0)
If strComputerName = NULL then
wscript.quit
End if'------------------------------------------------------------
'Main scriptset objShell = CreateObject("WScript.Shell")
Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")
swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.
Set swbemServices = swbemLocator.ConnectServer(".", "root\SMS")
Set oProviderLocation = swbemServices.InstancesOf("SMS_ProviderLocation")
For Each oLocation In oProviderLocation
If oLocation.ProviderForLocalSite = True Then
Set swbemServices = swbemLocator.ConnectServer(oLocation.Machine, "root\sms\site_" + oLocation.SiteCode)
End If
NextSet arrComputers = SWbemServices.ExecQuery("select * from SMS_R_System where Name='" & strComputerName & "' and (obsolete = 0 or obsolete is null)")
For Each objComputer In arrComputers
RemoveCollectionMembership objComputer.ResourceID
'Write to eventlog if Seventlog = 1
If Seventlog = "1" then
strMessage = strcomputername & " will be removed from the following collection ID's " & scollectionids
objShell.LogEvent EVENTLOG_INFORMATION, strMessage
End IF
NextSet objCollection = Nothing
Set SWbemServices = Nothing
Set SWbemLocator = NothingWscript.Quit
'------------------------------------------------
Sub RemoveCollectionMembership(intresourceid)
on error resume nextDim mCollectionID, i
mCollectionID = Split (sCollectionIDs, ":")
for i = Lbound(mCollectionID) to UBound(mCollectionID)Set objCollection = SWbemServices.Get("SMS_Collection='" & MCollectionID(i) & "'")
Set ObjDirectRule = SWbemServices.Get("SMS_CollectionRuleDirect").SpawnInstance_
ObjDirectRule.ResourceID = intresourceid
ObjCollection.DeleteMembershipRule objDirectRule
next
End Sub'------------------------------------------------
WScript.Quit(0)- Modifié Pierre-Luc R vendredi 29 juin 2012 15:29
-
dimanche 1 juillet 2012 20:02
Hi Pierre-Luc, (and the others)
First thanks for the reply. The script to move te computer out of the collection after a succ. OSD/TS seems to work. But as I mentioned before I have made a task sequence which only install's our standard software after the OSD. The Task Sequence works fine, but I dont get an email send out when the TS is finished. Do you perhaps can send me the code of this vbscript?. Now my script looks like this :
'==========================================================================
'
' VBScript Source File
'
' NAME: '
' AUTHOR: ' DATE : '
' COMMENT: script sends an e-mail in case of ended in success.
'
'==========================================================================
'Write out the log file
Set fso = CreateObject("Scripting.FileSystemObject")
Set ContactFile = fso.CreateTextFile("c:\temp\sendmail.txt", True)
ContactFile.WriteLine("script has started")
ContactFile.CloseOn Error Resume Next
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "<Image Deployment - Windows 7 Ent x64>"
objMessage.Sender = """SCCM_OSD_Mailer"" <noreply@xxxxxx.com>"
objMessage.To = "myemailadres"
'objMessage.Bcc = ""
'objMessage.Cc = ""
objMessage.From = "noreply@xxxxxx.com"
objMessage.TextBody = "<Image Deployment - Windows 7 Ent x64 TS was successfull" & vbCRLF & vbCRLF & "automatic message"
'==This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.XXXXXX.net"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
If Err.number <> 0 then
strMsg = "ERROR: ************ E-mail routine failed with Error: " & Err.Number & " - " & Err.description & " **************"
Else
strMsg = "E-mail was sent successfully"
End Ifthe status filter rule is started by this :
CSCRIPT.EXE D:\SccmScripts\testfilterrules\TSSucceeded_Email_Notification.vbs
component : task Sequence Manager
severity : Informational
message ID : 11171
-
mardi 3 juillet 2012 12:19
Hello! Here is the VBscript I use for sending me an email when a TS fails, just replace what is in bold with your infos.
Dim sComputerName
Set args = WScript.Arguments
sComputername = args.Item(0)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Task sequence failed for: " & sComputername
objMessage.From = "sccm@yourdomain.com"
objMessage.To = "your@emailadress.com"
objMessage.TextBody = "There was a problem with a task sequence for the computer " & sComputername
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "yourSMTPserverhere"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.SendStatus Filter Rule in SCCM:
CSCRIPT.EXE C:\SCRIPTS\SendEmailFailure.vbs %msgsys
Component : Task Sequence Manager
Severity : Informational
Message ID : 11170and in case you want to receive an email when a TS is succesful, you will need to copy the SendEmailFailure.vbs and call it SendEmailSuccessful.vbs and change the text in the objMessage.Subject to something like
objMessage.Subject = "Task sequence successful for: " & sComputername
and Create a new Status Filter rule in SCCM (point to the new VBS and Message ID 11171 instead of 11170)
CSCRIPT.EXE C:\SCRIPTS\SendEmailSuccess.vbs %msgsys
Component : Task Sequence Manager
Severity : Informational
Message ID : 11171 -
mardi 10 juillet 2012 14:49
Hi again Piere-Luc,
Excuses for asking again but I am not so well with scripting...When I run the script in primal script in debug mode this error comes back :
Untitled4.vbs(16, 2) Microsoft VBScript runtime error: Subscript out of range
as I take al look at the point where the script seems to fail it is here:
Dim sComputerName
Set args = WScript.Arguments
sComputername = args.Item(0)especially the part beginning with sComputername, when I delete the small s it comes back with the same error like :
Untitled4.vbs(16, 1) Microsoft VBScript runtime error: Subscript out of range
pff what Im I doing wrong....???
thnx again for the help!
-
mardi 10 juillet 2012 17:42
Hello! if you simply double click on the script it is normal because no arguments are passed to the script. When you execute the script through the Status Filter rule, it passes %msgsys (which is the AD name of the machine from where the message was triggered) as an argument : SendEmailSuccess.vbs %msgsys
To test it, open a DOS window and copy your VBS at the root of C:. Open a command prompt and type the following at C:\
C:\> SendEmailSuccess.vbs TESTCOMPUTER
Your argument will then be TESTCOMPUTER so the script will set sComputerName = TESTCOMPUTER so you should receive an email with Task sequence failed for: TESTCOMPUTER as a subject :)
Let me know how it goes!
-
mardi 10 juillet 2012 18:47
Hi,
That Works indeed, pff one step further I got the mail, but why does the script does not start throughout the status filter rule then?
Thank you for the help I appreciate that very much !
Louis
-
mardi 10 juillet 2012 19:51
If you go on the server in the event viewer, can you see the OSD logs that has message IDs 11171 or 11170
Maybe you need to activate logging ==>
Go to Component Configuration
Double click Status Reporting
Under Client Component status reporting, enable the Log checkbox and All Milestones and Details.
Because that rule is triggered by those IDs...If it is not logged, those IDs are not present and the rule will never be triggered!
-
mardi 10 juillet 2012 20:28
yes ! i think we've got it...that option was not marked on, do i also have to enable the checkbox 'log details on failure' or only the checkbox report and log --> all Milestones.
Great, I hope this works, thank you so much for the help !!!
-
mercredi 11 juillet 2012 07:43
Hi,
This morning I was very curious whether the status filter rule now also would work. This morning at 09: 15 there was a task sequence finished and gave the eventcode 11171, but again there was no mail sent. I wondered whether the adaption of this setting a reboot is required of the primary site server?
I'm really a bit sad because is am busy testing this for so long time and stil it does not work yet
-
mercredi 11 juillet 2012 12:11
Hmmm weird, mine did not require a reboot. We know for a fact that your script runs because you are able to do it manually...It is probably something related to the Status Filter Rule.
Can you post a screenshot of your Status Filter Rule property ? Maybe double check the path of the VBS (maybe you need some quotes if there are spaces in the path)? and also confirm that it runs on a 11171 Message ID ?
-
mercredi 11 juillet 2012 13:00
hi there,
how do i attach an image in this forum?
-
mercredi 11 juillet 2012 13:16
When you reply to a message, at the top of the message box, just use the last icon at right...
-
mercredi 11 juillet 2012 13:18
-
mercredi 11 juillet 2012 13:19
-
mercredi 11 juillet 2012 13:24
and the cmd line is like :
CSCRIPT.EXE D:\SccmScripts\SendEmailSuccess.vbs %msgsys
-
mercredi 11 juillet 2012 13:58
Should work but I just remembered something from where I used to work... Everything was working fine with CSCRIPT.exe D:\SccmScripts\SendEmailSuccess.vbs %msgsys and at some point it stopped working. I had to put C:\Windows\System32\cscript.exe D:\SccmScripts\SendEmailSuccess.vbs %msgsys to make it work again ?
I set it up with just cscript.exe this week where I am now working and it's working fine but you can give this a try.
Hopefully it'll work!
-
mercredi 11 juillet 2012 14:14
ok, but the script runs on a 2008 server so i searched where the cscript.exe was stored. It is in :C:\Windows\winsxs\wow64_microsoft-windows-scripting_31bf3856ad364e35_6.1.7600.16385_none_aeb1ef0f4e6bba1d
do I have to put that path in ?
-
mercredi 11 juillet 2012 14:30
Yes, my path was for Win Server 2003 but just put the correct path for Windows 2008 :)
-
mercredi 11 juillet 2012 15:54
It is really a mistery why my status filter rule does not want to work. I guess everything is tried out now. Almost everthing is checked, and still got no mail send...
pfff, the other status filter rules I have applied, like remove the client from the unattended collection after an OSD works fine with the combination of a cscript and the rule. But unfortunately this rule is very imprtant for our organisation. Perhaps I will make a case by Microsoft so they can take a look at it. otherwise i am out of sync.....
Do you perhaps have heard from others who have this issue also? Thank you so much for you're help, and if there is something that's coming into you're mind, please let me know.
Louis
-
mercredi 11 juillet 2012 17:06The only thing I would think of is maybe an access issue since it works in the context of your account but it doesn't seem to work from the SCCM server but I don't really know how to check for that and if there are really rights for SMTP server to send email...
-
jeudi 12 juillet 2012 06:50
Hi,
Do you know under which account the scripts on the sccm server are running? How can I find out/check ? Perhaps this account has no permissions to do this..?
-
jeudi 12 juillet 2012 12:19
Hmm maybe it could be the network account or local system from SCCM but I don't really know how to verify or confirm this...
-
jeudi 19 juillet 2012 06:32
Hi there,
I've got the sollution for my problem :)
What was the question ? the status filter rule stood beneath in the rule list, and thus was never triggerd....the reason I don't know, but now I have put it on top of the list and it works fine !!
Perhaps others have the same problem, so guys be aware of this.
-
lundi 27 août 2012 11:29
Hi,
Now finally the script works fine and the email is send. But sometimes I see a weird computername is given in the eventviewer (and in the email) on the primary site when the OSD TS has finished successfully. Like MINNT-DS2IK0Q instead of the 'normal' pc name which we have. Has this something to do with the fact that those machines were 'reimaged' and thus were already known to SCCM?
- Modifié Louisveltmeijer lundi 27 août 2012 11:45
-
vendredi 14 septembre 2012 06:35
Hello Pierre-Luc, (and others)
Still got one question, suddenly my rule for removing a machine from a collection does not work anymore. I asked my self if it is possible to have 2 status filter rules which have the same trigger of the message-id (11171) and both start a cscript. One which is sending an email, this one is still running, but he one beneath that is not....do you have any idea why ?
-
mercredi 3 octobre 2012 19:47
Hello, sorry for the delay...
Maybe the second rule is not running because it gets to the first and then doesn't look further to run the other rule...but one question though, if you have 2 rules on message ID 11171, why don't you just run them all in the same rule instead of having two (like merge your 2 VBS scripts into one) ?
-
mercredi 3 octobre 2012 21:18
Louisveltmeijer, you are exactly correct: once a rule is applied for 11171, no subsequent rules will be done.
You will need to combine your vbs into 1. If combining isn't easily done, what I've done in the past is create a .cmd file; and THAT is what the status filter runs. the .cmd file contains two lines:
c:\windows\syswow64\cscript.exe d:\WhereMyScriptsAre\Script1.vbs
c:\windows\syswow64\cscript.exe d:\WhereMyScriptsAre\Script2.vbs
Standardize. Simplify. Automate.

