Virtualization Articles and Resources

Accelerate Data ONTAP SMI-S Agent 5.1 discovery process in SCVMM 2012 R2 using PowerShell Scheduled Job.

SCVMM 2012 R2 polls "Windows Standard Storage management service" every 2 hours to update its Database, you can verify this behaviour by analyzing the "Reads Storage Provider" job in SCVMM Jobs pane.

We can see below that the Read-SCStorageProvider cmdlet retrieves updated information from the storage provider including array, pool,and logical unit information exposed by the SMI-S provider every two hours.

Now if you need to fasten up this pooling process, you can create a scheduled job using powershell scheduled jobs "PSScheduledjob" module and fasten up the discovery process. Copy paste the below snippet in PowerShell - "Run as Administrator Mode".

#You can create scheduled tasks very easily if you have PowerShell v3 and above .

# Creates a scheduled job immediately which runs every 10 minutes

$trigger = New-JobTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 10) -RepetitionDuration ([TimeSpan]::MaxValue)

Register-ScheduledJob -Name ReadStorageProvider -Trigger $trigger -ScriptBlock {

<#

.DESCRIPTION

Following snippet runs the Read-SCStorageProvider cmdlet which retrieves updated information from the storage provider including array, pool,and logical unit information exposed by the SMI-S provider every 10 minutes

#>

  ipmo virtualmachinemanager

  Get-SCStorageProvider | Read-SCStorageProvider

}

#After i Run this script on my elevated powershell prompt i was able to see the Job created in task scheduler under "TaskSchedulerLibrary\Microsoft\Windows\powershell\scheduledjobs"

Next wait for 10 minutes and verify that the job starts as scheduled every 10 minutes in SCVMM - Jobs pane.

I hope that you have enjoyed this blog entry  and have found this information helpful.

Good Luck !

Thanks,

Vinith

Please Note:

All content posted on the NetApp Community is publicly searchable and viewable. Participation in the NetApp Community is voluntary.

In accordance with our Code of Conduct and Community Terms of Use, DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information (PII)
  • Copyrighted materials without the permission of the copyright owner

Continued non-compliance may result in NetApp Community account restrictions or termination.

All Community Forums
Public