Hi all
Below is the code i tried for displaying the values using HTML. but when i am running the application, it is giving me output for only {0} to {4}.. others are not displaying.
Please let me know what is the issue.
$CurrentSystemHTML = @"
<table>
<tr>
<td>Name</td>
<td>{0}</td>
</tr>
<tr>
<td>Domain</td>
<td>{1}</td>
</tr>
<tr>
<td>Manufacturer</td>
<td>{2}</td>
</tr>
<tr>
<td>Model</td>
<td>{3}</td>
</tr>
<tr>
<td>TotalRAM</td>
<td>{4}</td>
</tr>
<tr>
<td>PhyProcessors</td>
<td>{5}</td>
</tr>
<tr>
<td>LogicalProcessors</td>
<td>{6}</td>
</tr>
<tr>
<td>PageFilePath</td>
<td>{7}</td>
</tr>
<tr>
<td>PageFileSize</td>
<td>{8}</td>
</tr>
<tr>
<td>ComputerBrowser</td>
<td>{9}</td>
</tr>
<tr>
<td>WindowsUpdate</td>
<td>{10}</td>
</tr>
<tr>
<td>SNMP</td>
<td>{11}</td>
</tr>
</table>
"@ -f $wmiSystem.Name,$wmiSystem.Domain,$wmiSystem.Manufacturer,$wmiSystem.Model,"$([string]([System.Math]::Round($wmiSystem.TotalPhysicalMemory/1GB,2))) GB",$wmiSystem.NumberOfProcessors,$wmiSystem.NumberOfLogicalProcessors,$pf.Name,[String] $pf.AllocatedBaseSize + " MB",$strCBS.Status,$strWAU.Status,$strSNMP.Status
Thank you
What I have tried:
$CurrentSystemHTML = @"
Name | {0} |
Domain | {1} |
Manufacturer | {2} |
Model | {3} |
TotalRAM | {4} |
PhyProcessors | {5} |
LogicalProcessors | {6} |
PageFilePath | {7} |
PageFileSize | {8} |
ComputerBrowser | {9} |
WindowsUpdate | {10} |
SNMP | {11} |
"@ -f $wmiSystem.Name,$wmiSystem.Domain,$wmiSystem.Manufacturer,$wmiSystem.Model,"$([string]([System.Math]::Round($wmiSystem.TotalPhysicalMemory/1GB,2))) GB",$wmiSystem.NumberOfProcessors,$wmiSystem.NumberOfLogicalProcessors,$pf.Name,[String] $pf.AllocatedBaseSize + " MB",$strCBS.Status,$strWAU.Status,$strSNMP.Status