amidaware / community-scripts

A curated list of powershell, python, and batch scripts for use in TacticalRMM or anywhere!
MIT License
122 stars 84 forks source link

Create Win_StorageCraftImageManager_Status.ps1 #201

Closed ConvexSERV closed 12 months ago

ConvexSERV commented 12 months ago

Checks to see of scheduled Image Manager jobs are completing or failing. Reads Image Manager DB (takes a copy) to check for failing events. Checks for IM folder activity. Checks for IM Events in Application Log. Returns Result.

Note: Requires MS Access 2010 Runtime. Script will attempt to download/install the runtime if needed.

ConvexSERV commented 12 months ago

We are using it in prod.

It's a bit unconventional, but it finds problems that don't show up in the event logs. There are a few workarounds in the script because ImageManager doesn't clean up after itself in the database.

I missed the #good-habits part about the temp path. I will make that modification and re-submit.

Thanks, Jim

-----Original Message----- From: silversword411 @.**@.%3e>> Reply-To: amidaware/community-scripts @.**@.%3e>> To: amidaware/community-scripts @.**@.%3e>> Cc: ConvexSERV @.**@.%3e>>, Author @.**@.%3e>> Subject: Re: [amidaware/community-scripts] Create Win_StorageCraftImageManager_Status.ps1 (PR #201) Date: 12/06/2023 02:21:43 PM

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@silversword411 commented on this pull request.

This looks like an extensive script :)

Any reason you're using c:\windows\temp instead of the recommended folders? https://docs.tacticalrmm.com/contributing_community_scripts/#good-habits

I'm guessing you're using this in prod because you put it in staging?


In scripts_staging/Win_StorageCraftImageManager_Status.ps1https://github.com/amidaware/community-scripts/pull/201#discussion_r1417873800:

+

  • Return $Result +} +###---------------------------------------------------------------------------------###
  • +#Initialize Variables +$NowTime = [DateTime]::Now +$AlertLevel = 0 #0 = Pass, 1 = Informational, 2 = Warning, 3 = Error +$AlertText = ''

  • +####-------------------------------### +# Database Checks # +####-------------------------------###

  • +#Image Manager will have the DB open exclusively. Copy the DB to Temp. +$IMDBPath = "C:\Windows\temp\Imagemanager.mdb"

Any reason you're using hard coded windows\temp folder?

Can we use the recommended folders? https://docs.tacticalrmm.com/contributing_community_scripts/#good-habits

— Reply to this email directly, view it on GitHubhttps://github.com/amidaware/community-scripts/pull/201#pullrequestreview-1768452697, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHGFBXZRGMRFX236JIJNQN3YIDAUPAVCNFSM6AAAAABAJXJKVCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONRYGQ2TENRZG4. You are receiving this because you authored the thread.Message ID: @.***>