Home > Opalis, Opalis Tips and Tricks, Powershell > Updating Custom Fields using PowerShell

Updating Custom Fields using PowerShell

The question of how to update custom fields using PowerShell comes up quite often on the technet forum so I have tried to give a variety of approaches here on how to achieve this. PowerShell does seem to be quite resource intensive so keep a close eye on your RMS if you are running PowerShell scripts on a schedule and also test all of these scripts in a suitable test environment before deploying.

Here is the run through – https://systemcentersolutions.files.wordpress.com/2010/06/updatecustomfields.docx

  1. marcoshaw
    August 24, 2010 at 5:05 pm

    Maybe if a time was added to the -Critera expression, that might speed things up quite a bit. As it stands, I believe every alert will be processed in the DB, while if there was a timestamp added to the query, maybe that would help things.

    • August 24, 2010 at 5:58 pm

      Hi Marco

      What I’ve done is to pull back (using criteria) all alerts with resolution state = 0. But then as part of my updates, I update the resolution to state to 5. This way, each alert is only pulled back once (I assumed as part of this that the customer would always want each alert processed). But an alternative would be to use a timestamp and update the new alerts in the x minutes.

      Thanks for your excellent powershell blog and contributions to the newsgroups which I have always found useful.



  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: