Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Need Help with Powershell Advance Function

$
0
0

Hi , I’m new to Powershell and I’m working on script to gather some hardware information .
Script works fine only for single computer but is coming up with an error when I’m trying to get information’s from multiple remote computers .

Method invocation failed because [System.Object[]] doesn’t contain a method named ‘op_Division’.
At C:\HwInfops1.ps1:46 char:2
+ $HWHashTabel =[ordered]@{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Division:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound

param (
[Parameter(Mandatory=$true)]
[string[]]$computername
)

I have Parameter $computername set to accept multiple computers .
Can anyone help me please .
Script is attached as TXT file .


Viewing all articles
Browse latest Browse all 13067

Trending Articles