SCCM 2007- EMAIL NOTIFICATION

how do i set up Email notification or is there a trick before a advertisement starts with the collection members where the advertisement is pointing to. I understand that SCCM does not have a ready made function for the same. To add we dont have SCOM in our environment.
   I would like the same feature before a sccm software update starts as well.

OR.

  mention the collection and servers when the maintainance window is hit by a email.
 
   Is there a way that this can be done?
LVL 6
questionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

merowingerCommented:
One option i see is to put something like a script into the sccm program command line instead of the installation command (like a wrapper).
The scripts send an email and triggers the installation afterwards.
The problem is that the mail addresses cannot be defined in the script as each starting program would send an email to each mail address configured.
So the script should first read out the current username of the computer, get the users mail address and then send an mail from it's account to it's account :)
Also the mail is send after the advertisement started.

If this is no option and you want an mail to be send befor the advertisement starts you could write a script or application which is executed on the server and do the whole job
- Assign advertisement to collection and send mail....
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
merowingerCommented:
AddOn to the second option: As collection are normally computer based there could be a problem identifying the user....
0
questionAuthor Commented:
Thanks merowinger. I actually need an email to be sent out to a administrator group /server support group (DL) ie.. serversupport@Xyz.com with the advertisement that will run and the collection and the members in the collection.
-> i dont actually need to notify users automatically.

Below is an example.. if we push adobe to collection named floor1 it should send a email to the server support before 1hr of schedule run in below format..

The advertisement "Adobe ..." is set to run at "XX:YY" PM for the following collection "Floor 1"
The Computers in the collection  are:
1
2
3
4
......


I think this clearly explains what i need to be doing.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

merowingerCommented:
OK understand that.
The Problem is that we need a trigger which executes that.
So either you need a script / tool which assigns the advertisement to the collection, reads out the members and sends an mail to your mail address, or there sould be an script/tool which is triggerd by somehting like task scheduler and checks the new adertisement to colellection assignments and then does the rest of the job.

Personally i would prefer a tool which is then used instead of the sccm console to assign the advertisements to the collection. What do you think?
0
questionAuthor Commented:
can you help me with a good tool so that i can try the same and see if it works. Actually i am only used to assigning the advertisements manually. Sounds interesting to have a tool do that.

Preferably the tool should be a free ware else its still alright. Well.. scripting for the same can be done via vbscript but as you said the script needs to be triggered individually which does not serve the purpose.
0
merowingerCommented:
I don't know any freeware tool which can handle this. Do you have someone which could do that with vb.net e.g.?
I cannot write the whole tool for you, as there are needed several days for it.
I've already created similar tools. I think the best would be if there are ListBoxes which shows all applications on the one side and all possible collections on the other one..?!?

Here are some hints:
Connect to the sccm server:
'****************************************************************************************************************
Dim objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Try
      objSWbemServices = objSWbemLocator.ConnectServer("YourSiteServer", "root\sms\site_" + "YourSiteCode")
Catch ex As Exception
      MsgBox("Error when connecting to sccm. Error Code: " & ex.Message, MsgBoxStyle.Critical)
      End
End Try
'****************************************************************************************************************


Get all collections read out into a listbox (this has be done with the packages and the program, too
'****************************************************************************************************************
allCollections = objSWbemServices.ExecQuery("SELECT * FROM SMS_Collection")
For Each strCollection In allCollections
      ListBox1.Items.Add(strCollection.Name)
Next
'****************************************************************************************************************


Get all selected collections
'****************************************************************************************************************
For Each strCollection In clbCollections.CheckedItems
      'Get the collction id in order to create the advertisement
      'Create the advertisement
      'Then send mail with info
Next
'****************************************************************************************************************

Get the collection IDs from the selected one
'****************************************************************************************************************
allCollections = objSWbemServices.ExecQuery("SELECT * FROM SMS_Collection WHERE Name = '" & strName & "'")
For Each strCollection In allCollections
      intCollectionID = strCollection.CollectionID
Next
'****************************************************************************************************************


'Create the advertisement
'****************************************************************************************************************
Set newAdvertisement = connection.Get("SMS_Advertisement").SpawnInstance_
newAdvertisement.CollectionID = <CollectionID>>
newAdvertisement.PackageID = <PackageID>>
newAdvertisement.ProgramName = <ProgramName>
newAdvertisement.AdvertisementName = "My Advertisement"
newAdvertisement.AdvertFlags = newAdvertisementFlags
newAdvertisement.PresentTime = <SpecificTime>
newAdvertisement.PresentTimeEnabled = <SpecificTime>
newAdvertisement.Put_
'****************************************************************************************************************
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.