Skip to main content

Posts

Showing posts from July, 2009

“mid” like functionality in batch script

for awhile, i used for looping to do a lot of manipulation in batch scripts until i ran across this gem.  a friend of mine asked me how to manipulate a date string awhile back.  this is what i came up with. let’s begin with the date /t command.  running it gives us this output: Fri 07/31/2009   most date formats with respect to dates in filenames generally don’t use “/” or include the short day name “fri”.  my conventional method is to push this through a for loop and break out the thing into tokens.  i’ve done this in below by utilizing “/” and “,” as the delimiters. for /f "tokens=1,2,3,4 delims=/, " %a in ( 'date /t' ) do @echo %b%c%d   now we get this output when we echo %b%c%d. 07312009   the challenge i got was how to get the date to show up as 090731.  if we tried to use “0” as a delimiter, it would clearly fail as 07 and 09 have zeroes in them.  here’s an example: for /f "tokens=1-5 delims=/,0 " %a in (

excellent demo on using custom composite data types

Image via Wikipedia if you happened to miss the last system center virtual user group, catch the recorded livemeeting.  there’s a great presentation on using composite monitors.  i believe the source is what’s on technet currently, but the explanation and step-by-step demonstration will help cement the idea.  check it out on system center central : http://www.systemcentercentral.com/Details/tabid/147/IndexID/21509/Default.aspx

sql query to list all manual reset monitors

Image via Wikipedia looking for an easy way to list all of your unit monitors classified as a manual reset?  here’s a sql query that you can execute to list them out. SELECT mv.name, mv.enabled, mv.displayname, mtv.name, mpv.name FROM monitorview mv inner join monitortypeview mtv on mv.monitortypeid=mtv.id inner join managementpackview mpv on mtv.managementpackid = mpv.id WHERE mv.IsUnitMonitor = 'True' and mtv.name like '%manualreset%' you can follow the entire thread here .

bug in notification subscription when using custom fields with opsmgr

back last month, i posted an odd behavior i was seeing in opsmgr.  anytime i used a custom field, the notification subscription would not work.  one of the peeps on the forum called pss to work through the issue and had been informed that it was a bug, completely reproducible. you can read the entire thread here: http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/260be16a-0f45-4904-8093-7c1caa5ed546 otherwise, here’s a short summary of how to fix the problem: Export the ‘Notifications Internal Library’ Management Pack. Increase the <Version>. For example: <Version> 6.1.7221.1 </Version> Locate the mistakes for each custom Field, which will look like: < SimpleExpression xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" > < ValueExpression > < Property > Custom8 </ Property > </ ValueEx

configmgr console crashes with error “input string was not in a correct format”

i recently posted a fix to a console crashing condition with configmgr.  looks like it’s round two.  one of the configmgr admins here ran into this issue and asked me about.  this should be an entertaining post, especially when i highlight the advice from microsoft on how to fix this problem.  let’s start, shall we? to begin with, the console crashes, from any machine, when you try to view the settings of specific active directory discovery methods.  this was occurring on two different servers and not always the same ad discovery method.  the only thing of interest that both servers had in common was that they were migrated to new hardware and had run through the site recovery wizard. i captured the message that fires up whenever a crash condition occurs.  it looks like the likely offense is this message: Input string was not in a correct format. that usually means site control configuration file corruption to me.  note that if you modify your site control file, you probably

management pack university is live!

Image via Wikipedia i’m not sure if you’ve seen or heard about mp university.  after sharing a link, some folks were surprised about where i found the content.  mp university is live!  if you’re interested in checking it out, here’s a link: http://technet.microsoft.com/en-us/opsmgr/cc671407.aspx . there are two tracks so far, one for beginner content and the other for advanced topics.  once you get to the site, use the link “management pack university videos”.  great stuff!

understanding the “ad op master is inconsistent” alert

i use the term “understanding” loosely.  this is by far no definitive guide on this particular alert, just a few things i have picked up in my attempt to understand it. let’s look at the context of the alert: The Domain Controller's Op Master is inconsitent. See additional alerts for details. first of all, it gives very little information.  the only particularly useful detail is that it indicates which server is having the issue.  other than that, just a spelling error as there are no additional critical alerts to look at for details. this rule, as you know, comes from a sealed mp.  therefore, we can’t modify anything in it except the overrides.  the couple i’ve tinkered with are: interval (sec) log success event to begin with, interval (sec) is just set way too high.  the default is 60 seconds.  why on earth would anyone want to know that your op master consistency may be off, every minute?  actually, i could think of a few reasons, but really, it’s o