This commit is contained in:
Zhoulin Dai
2018-11-30 17:15:13 +08:00
parent 0743c67799
commit 560739222d
3 changed files with 19 additions and 19 deletions

View File

@@ -140,10 +140,10 @@ Function Generate_HtmlReport($Data, $Dir) {
$dataTime = Get-Date -Format 'yyyy-M-d_h-m'
$vcName = vcName($Data)
$filename = 'compreport_' + $vcName + $dataTime + '.html'
$filePath = $Dir + $filename
$filePath = $Dir + '\' + $filename
#save report
$content |Out-File -FilePath $filePath -Encoding utf8| Out-Null
info ("Report " + "'" + $Dir + $filename + "'" + " has been created!")
info ("Report " + "'" + $filePath + "'" + " has been created!")
}
Function Generate_SummaryReport($Data, $Dir) {
@@ -440,10 +440,10 @@ Function Generate_SummaryReport($Data, $Dir) {
$dataTime = Get-Date -Format 'yyyy-M-d_h-m'
$vcName = vcName($Data)
$filename = 'sumreport_' + $vcName + $dataTime + '.html'
$filePath = $Dir + $filename
$filePath = $Dir + '\' + $filename
# Out-put a html report
$content |Out-File -FilePath $filePath -Encoding utf8| Out-Null
info ("Report " + "'" + $Dir + $filename + "'" + " has been created!")
info ("Report " + "'" + $filePath + "'" + " has been created!")
}
Function Generate_CsvReport($Data, $Dir) {
@@ -542,9 +542,9 @@ Function Generate_CsvReport($Data, $Dir) {
$dataTime = Get-Date -Format 'yyyy-M-d_h-m'
$vcName = vcName($Data)
$filename = 'compreport_' + $vcName + $dataTime + '.csv'
$filePath = $Dir + $filename
$filePath = $Dir + '\' + $filename
#save csv report
info ("Report " + "'" + $Dir + $filename + "'" + " has been created!")
info ("Report " + "'" + $filePath + "'" + " has been created!")
$content |Out-File -FilePath $filePath -Encoding utf8| Out-Null
return $content
}
@@ -785,7 +785,7 @@ $summaryHead = @'
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-image: url(https://myvmware.workspaceair.com:443/SAAS/jersey/manager/api/images/510495)
background-image: url(https://myvmware.workspaceair.com/SAAS/jersey/manager/api/images/520470)
}
#header{
margin: 0 auto;

View File

@@ -13,7 +13,7 @@ $apiQurryDict=@{}
#
Function PingApiServer(){
$apiServerIp='apigw.vmware.com'
$results =Test-NetConnection $apiServerIp -InformationLevel 'Quiet'
$results =Test-Connection $apiServerIp -Quiet
if($results -ne $true){
error ("Failed to access VMware Compatibility API,
Unable to use comparison function, only view basic hardware information;

View File

@@ -20,10 +20,10 @@ Considering many data center may have control on internet access, we create 3 cm
* Export-VCGReport: cmdlet to export the summary/html/csv reports
1. You need to first import this module after you import PowerCLI module
PS> Import-Module <path_to_VMware.VCGChecker.psd1>
PS> Import-Module &lt;path_to_VMware.VCGChecker.psd1>
2. Connect to the target vSphere hosts using Connect-VIServer and get VMHosts
PS> Connect-VIServer -Server <server> -User <username> -Password <password>
PS> Connect-VIServer -Server &lt;server> -User &lt;username> -Password &lt;password>
PS> $vmhosts = Get-VMHost
3. Collect the hardware data
@@ -31,10 +31,10 @@ PS> $hwdata = Get-VCGHWInfo -vmHosts $vmhosts
Note: if you don't have internet access, you need to connect your client to internet before proceeding to the next step.
4. Specify the target vSphere release you want to check and submit the hardware data to VMware website
PS> $vcgdata= Get-VCGStatus -Data $hwdata -Version '<release>'
PS> $vcgdata= Get-VCGStatus -Data $hwdata -Version '&lt;release>'
5. Save the compatibility reports
PS> Export-VCGReport -Data $vcgdata -Dir <dir>
PS> Export-VCGReport -Data $vcgdata -Dir &lt;dir>
# Known Limitation
* The module is not able to get the firmware version for HBA devices.