PropertyBagExample1.ps1


# Easy way to output a few property bags for testing.
$NumSamples = 3
0..$NumSamples | % {
  $api = new-object -comObject 'MOM.ScriptAPI'
  $bag = $api.CreatePropertyBag()
  $DatabaseName = "someDBname"
  $bag.AddValue('Index',$_ )
  $bag.AddValue('SomeDate',(Get-Date -f "hh.mm.ss.ffff") )
  $api.Return($bag) #Output for testing only
}