Jump to content


matrix_rm

MOnitoring .encrypted file

Recommended Posts



I would think that you could do this with a script and therefore create a SCOM rule for it.

Share this post


Link to post
Share on other sites

OK, I do it but it still don't work. hire is my script

 

Dim fs, f, foldername,fd

set oAPI=CreateObject("MOM.ScriptAPI")

set oBag=oAPI.CreatePropertyBag()

Set fs = CreateObject("Scripting.FileSystemObject")
foldername="c:\"

status="OK"
Set fd = fs.Getfolder(foldername)

for each f in fd.files

if instr(f.name,".encrypted") then

status="NOT OK"

exit for

end if

next

Set fs = CreateObject("Scripting.FileSystemObject")
foldername="d:\"

status="OK"
Set fd = fs.Getfolder(foldername)

for each f in fd.files

if instr(f.name,".encrypted") then

status="NOT OK"

exit for

end if

next

Set fs = CreateObject("Scripting.FileSystemObject")
foldername="z:\"

status="OK"
Set fd = fs.Getfolder(foldername)

for each f in fd.files

if instr(f.name,".encrypted") then

status="NOT OK"

exit for

end if

next


Call oBag.AddValue("Status",status)
Call oAPI.Return(oBag)

 

I have 3 leters of disk on my server.

and it runs every 15 minutes. why it dont work?? where I cant find where is the problem?

Share this post


Link to post
Share on other sites

My quick look at this suggest the problem is with the script. Basically unless there is an encrypted file on Z:\ nothing will show up. So you need to go back to the drawing board and re-write you script.

Share this post


Link to post
Share on other sites

I would rather use Configuration Manager (if you got it). It has file inventory built in. Using a script would really be a heavy duty job... Running the script would strain the server's resources a lot...

Share this post


Link to post
Share on other sites

I know the SW inventory takes a long time to complete, but thats the price to pay for not impacting the server... Just "Create Custom Client Device Settings" and deploy it to a device collection containing only the file server. Also, make sure you run this at a time when it's convenient.

 

If you are worried about "Slow Software Inventory Cycle", then set it up to only collect a few subdirectories from the server. This way you will get a few sample directories instead of the entire disk making the inventory cycle much faster since it's not gathering so much information.

 

Thats just my two cents on the matter.

Share this post


Link to post
Share on other sites

It would be more than the impact to the servers as to why you should never user SW Scan. SW scan has a 4 hour (runtime) timeout, once the timeout occur, the task is rejected and no results are returned to CM. So particularly for servers, you would never know if the server has no results or if the SW Scan failed to complete. Since SW scanning is runtime not realtime, your SW scans can take days… Yes I said days before it finally timeout. To top this off, while the SW scanning occurs, no other inventory task can happen. This mean you Heartbeat and Hardware inventory will never happen until SW scans are done.

 

So… CM’s SW scans are useless. You would be far better off using a script or a CM CI script for this.

As an aside scripts are usually executed as “Normal” process, therefore it will share all the “normal” CPU cycles but anything higher will get whatever it needs. You could run the script as “below Normal” task, this would take longer with less impact on the computer. This would still be far better than what CM SW scanning does.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...