User Tools

Site Tools


windows:powershell:insertstorage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
windows:powershell:insertstorage [2013/10/15 03:13] – external edit 127.0.0.1windows:powershell:insertstorage [2018/05/15 03:00] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 <code powershell insertStorage.ps1> <code powershell insertStorage.ps1>
-$HostList = Invoke-Sqlcmd -Query "EXEC Windows.Host_Select_HostID_HostName" -ServerInstance "sql1" -Database "SysMetrics"+$HostList = Invoke-Sqlcmd -Query "EXEC Windows.Host_Select_HostID_HostName" -ServerInstance "sql1" -Database "JiMetrics"
 $HostList | ForEach-Object { $HostList | ForEach-Object {
     $HostName = $_.HostName     $HostName = $_.HostName
Line 24: Line 24:
             $DiskFormat, $DiskLabel = $_.FileSystem, $_.Label             $DiskFormat, $DiskLabel = $_.FileSystem, $_.Label
             $sql = "EXEC Windows.Storage_Insert $HostID, '$DiskPath', '$DiskFormat', '$DiskLabel', $DiskSizeGB, $DiskFreeGB"             $sql = "EXEC Windows.Storage_Insert $HostID, '$DiskPath', '$DiskFormat', '$DiskLabel', $DiskSizeGB, $DiskFreeGB"
-            Invoke-Sqlcmd -Query $sql -ServerInstance "sql1" -Database "SysMetrics"+            Invoke-Sqlcmd -Query $sql -ServerInstance "sql1" -Database "JiMetrics"
     }}}     }}}
 </code> </code>
windows/powershell/insertstorage.1381806784.txt.gz · Last modified: (external edit)