Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 53
  1. #16
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Browni,

    That is really weird! Could you run it again and look at the PS window, it's hidden but if you hover over the PS icon on the task bar you can show it, and see if you are getting errors?

    Thanks for testing!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  2. #17
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,054
    Thanks
    164
    Thanked 194 Times in 187 Posts
    Browni, that's what I had. If you look at the PS window you ran the script from, there will be copious errors displayed.

    Oops, didn't see RG's post...
    What do you mean nothing is impossible? I've been doing nothing for years.

  3. #18
    WS Lounge VIP Browni's Avatar
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    1,752
    Thanks
    39
    Thanked 178 Times in 155 Posts
    The errors didn't appear until I clicked exit <<< scrap that, the errors appeared straight away on a second run.
    Code:
    New-PSSession : [IAN-W10] Connecting to remote server IAN-W10 failed with the following error message : WinRM cannot
    process the request. The following error with errorcode 0x8009030e occurred while using Negotiate authentication: A
    specified logon session does not exist. It may already have been terminated.
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
    use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config. For more
    information, see the about_Remote_Troubleshooting Help topic.
     Other Possible Cause:
      -The domain or computer name was not included with the specified credential, for example: DOMAIN\UserName or
    COMPUTER\UserName.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:3209 char:9
    +   $CS = New-PSSession -ComputerName "$CompName"
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : 1312,PSSessionOpenFailed
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:346 char:32
    +   $CompSysObj = Invoke-Command @ICArgs
    +                                ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:420 char:32
    +   $enclosure =  Invoke-Command @ICArgs
    +                                ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Cannot index into a null array.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:422 char:3
    +   $ChassisNo = $enclosure.ChassisTypes[0]
    +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:440 char:33
    +   $BIOSObject =  Invoke-Command @ICArgs
    +                                 ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Get-BiosType : Cannot bind argument to parameter 'CS' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:468 char:30
    +     Switch (Get-BiosType -CS $CS) {
    +                              ~~~
        + CategoryInfo          : InvalidData: (:) [Get-BiosType], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-BiosType
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:507 char:32
    +   $CPU_Object = Invoke-Command @ICArgs
    +                                ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:556 char:33
    +   $MemoryInfo =  Invoke-Command @ICArgs  |
    +                                 ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:560 char:29
    +      Get-MaxLength -TestObj $MemoryInfo.Manufacturer -MinLen 12
    +                             ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:578 char:31
    +   $MemoryInfo = $MemoryInfo | Format-Table -Property $fmtMEM |
    +                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:650 char:27
    +   $Video = Invoke-Command @ICArgs
    +                           ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:703 char:26
    +   $Mons = Invoke-Command @ICArgs
    +                          ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:708 char:11
    +   $Mons | Add-Member @AMArgs
    +           ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCo
       mmand
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:757 char:35
    +   $MNLen = Get-MaxLength -TestObj $Mons.Name         -MinLen 12
    +                                   ~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:758 char:35
    +   $MFLen = Get-MaxLength -TestObj $Mons.Manufacturer -MinLen 12
    +                                   ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:785 char:18
    +          $mons | Format-Table -Property $monfmt | Out-String
    +                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:819 char:35
    +     $PhyDiskInfo = Invoke-Command @PDIArgs
    +                                   ~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:826 char:20
    +     $PhyDiskInfo | Add-Member @AMArgs
    +                    ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCo
       mmand
    
    Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:831 char:20
    +     $PhyDiskInfo | Add-Member @AMArgs
    +                    ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCo
       mmand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:847 char:35
    +     $RotateSpeed = Invoke-Command @ICArgs
    +                                   ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Cannot index into a null array.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:885 char:23
    +   $TrimStatus = (&{If([int]$TrimVal[1] -eq 0)
    +                       ~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:895 char:28
    +     Get-MaxLength -TestObj $PhyDiskInfo.Model        -MinLen 4
    +                            ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:897 char:28
    +     Get-MaxLength -TestObj $PhyDiskInfo.SerialNumber -MinLen 13
    +                            ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:932 char:12
    +            Format-Table -Property $fmtPhyDisk1 | Out-String
    +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:941 char:12
    +            Format-Table -Property $fmtPhyDisk2 | Out-String
    +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2577 char:18
    +   Invoke-Command @ICArgs
    +                  ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1002 char:34
    +     $Partitions = Invoke-Command @ICArgs
    +                                  ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1006 char:19
    +     $Partitions | Add-Member @AMArgs
    +                   ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCo
       mmand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1040 char:30
    +   $CD      =  Invoke-Command @ICArgs
    +                              ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1075 char:34
    +   $MappedDrives = Invoke-Command @ICArgs
    +                                  ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1138 char:33
    +   $ShareInfo  = Invoke-Command  @ICArgs |
    +                                 ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1284 char:31
    +     $NetInfo = Invoke-Command @ICArgs
    +                               ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1286 char:39
    +     $NameLen = Get-MaxLength -TestObj $NetInfo.Name -MinLen 10
    +                                       ~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1298 char:12
    +            Format-Table -Property $fmtNet -wrap | Out-String
    +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1317 char:30
    +     $IPInfo = invoke-command @ICArgs
    +                              ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1379 char:39
    +   $tboxPrinters.Text = Invoke-Command @ICArgs |
    +                                       ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1392 char:29
    +   $CurOS   = Invoke-Command @ICArgs
    +                             ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2739 char:30
    +      Invoke-Command -Session $cs -ScriptBlock $SBCode
    +                              ~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1419 char:36
    +   $LastBootUpTime = Invoke-Command @ICArgs
    +                                    ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1439 char:35
    +     $OSCompacted = Invoke-Command @ICArgs
    +                                   ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1465 char:30
    +     $RO     = Invoke-Command @ROArgs
    +                              ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2439 char:24
    +   $av = Invoke-Command @ICArgs
    +                        ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2689 char:19
    +    Invoke-Command @ICArgs
    +                   ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1642 char:36
    +   $UIDLen = Get-MaxLength -TestObj $uai.Name   -MinLen 6
    +                                    ~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1643 char:36
    +   $WGLen  = Get-MaxLength -TestObj $uai.Domain -MinLen 9
    +                                    ~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1664 char:19
    +   $uai   = $uai | Format-Table -Property $fmtAcct | Out-String
    +                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1736 char:33
    +   $DriverInfo =  Invoke-Command @ICArgs |
    +                                 ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Get-MaxLength : Cannot bind argument to parameter 'TestObj' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1742 char:28
    +     Get-MaxLength -TestObj $DriverInfo.DriverVersion -MinLen 14
    +                            ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Get-MaxLength], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MaxLength
    
    Format-Table : The Width key has no value.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1755 char:19
    +     $DriverInfo | Format-Table -Property $fmtDRVR | Out-String
    +                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Format-Table], NotSupportedException
        + FullyQualifiedErrorId : DictionaryKeyMissingValue,Microsoft.PowerShell.Commands.FormatTableCommand
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1935 char:26
    +   $Prop = Invoke-Command @ICArgs
    +                          ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1953 char:28
    +   $Prop   = Invoke-Command @ICArgs
    +                            ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    You cannot call a method on a null-valued expression.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1957 char:23
    +       ARIV = ([Bool]$($Prop.HibernateEnabled.Equals(1)))}
    +                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1970 char:18
    +   Invoke-Command @ICArgs |
    +                  ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1989 char:28
    +   $UAC    = invoke-command @ICArgs
    +                            ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    You cannot call a method on a null-valued expression.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:1991 char:3
    +   $ARArgs = @{ARIN = 'Registry: UAC Enabled'
    +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2005 char:30
    +   $ScvsList = Invoke-Command @ICArgs
    +                              ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2059 char:34
    +   $colBatStatus = Invoke-Command @ICArgs
    +                                  ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
    that is not null or empty, and then try the command again.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:2129 char:31
    +    $colItems = Invoke-Command @ICArgs
    +                               ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    
    Remove-PSSession : Cannot bind argument to parameter 'Session' because it is null.
    At D:\Downloads\CMsPCInfo-Files\CMsPCInfo-PSDev3.ps1:3213 char:29
    +   Remove-PSSession -Session $CS
    +                             ~~~
        + CategoryInfo          : InvalidData: (:) [Remove-PSSession], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemovePSSes
       sionCommand
    
    PS D:\Downloads\CMsPCInfo-Files>
    Last edited by Browni; 2017-02-01 at 10:02.

  4. #19
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    24,335
    Thanks
    5
    Thanked 1,204 Times in 1,051 Posts
    RG,

    It runs without the errors showing but as with Browni there is almost no information in the results. I've attached the*saved results with personal information obscured.

    CMsPCInfoV30-30 for My-pc.txt
    Joe

  5. #20
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    24,335
    Thanks
    5
    Thanked 1,204 Times in 1,051 Posts
    Oops. Forgot to look at the PowerShell window. I've attached the errors from there.
    PS_errors.txt
    Joe

  6. #21
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Browni,

    Thanks again!

    The problem seems to be since I switched from CIM-Session to PSSession. The old version 20-xx worked fine with PS running as user or admin. 30-xx is having problems and will only run as admin. Of course I can't get the problem to show up on my 4 machines!

    There is something different in the configuration of your and Access's computers that will not allow the PSSession to be implemented.

    I'd appreciate if you both could run version 20-20: CMsPCInfoV20-20.zip and see if it works for you. It should work whether run as Admin or User in PS. Of course you'll get different results as some features can't be accessed unless you are Admin.

    Below is the output for all the machines on my peer-to-peer lan run with this command:
    Code:
    PS> .\CMsPCInfo-PSDev4.ps1 -AutoList -Quiet -ClearLog
    The command was run on my main desktop DellXPS8700 from a PS-ISE Admin window.

    CMsPCInfoV30-30 for DELLXPS8700.txt
    CMsPCInfoV30-30 for DELL137000JLT.txt
    CMsPCInfoV30-30 for DELLXPS14Z.txt
    CMsPCInfoV30-30 for BRUCESLT1564.txt

    Note the files above indicate version 30-30 which is what they are but run from my development copy which the command shows PSDev4.ps1.

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  7. #22
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,054
    Thanks
    164
    Thanked 194 Times in 187 Posts
    Success! It worked as expected. I just ran it without any parameters.
    What do you mean nothing is impossible? I've been doing nothing for years.

  8. #23
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Access,

    I assume you're talking version 20-20? Did you run it as Admin or as User in PS?

    Thanks for testing!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  9. #24
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,054
    Thanks
    164
    Thanked 194 Times in 187 Posts
    Yes it was 20-20 - I ran it as admin. But I've just run it as a user and still works, though with the caveat of needing admin to get some data (as you said it would).
    What do you mean nothing is impossible? I've been doing nothing for years.

  10. #25
    WS Lounge VIP Browni's Avatar
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    1,752
    Thanks
    39
    Thanked 178 Times in 155 Posts
    Ran as admin here

    CMsPCInfo for IAN-W10.txt

  11. #26
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Thanks Guys!

    It's obvious that I need to do more research into the use of the PSSession cmdlets.

    I'll get back if I ever figure out why it works for me but not for you guys.

    Thanks once again for your efforts in testing this out.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  12. #27
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    24,335
    Thanks
    5
    Thanked 1,204 Times in 1,051 Posts
    RG,

    FWIW, I'm running current Insider preview build 15019.
    Joe

  13. #28
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Hey Y'all,

    I've got my computers setup for standard Peer-to-Peer Networking. Are you using Homegroup or have you stopped the 2 services?
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  14. #29
    WS Lounge VIP Browni's Avatar
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    1,752
    Thanks
    39
    Thanked 178 Times in 155 Posts
    Only thing I have changed from standard is the workgroup name.

    I'm not using homegroup and haven't stopped any services.

  15. #30
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,970
    Thanks
    424
    Thanked 1,600 Times in 1,450 Posts
    Hey Y'all,

    Here's another info gathering command:

    winrm s winrm/config/client '@{TrustedHosts="YOUR PC NAME HERE!"}'

    Do it from PS as Admin window.

    Here's the results from my machine:
    Code:
    winrm s winrm/config/client '@{TrustedHosts="DellXPS8700"}'
    Client
        NetworkDelayms = 5000
        URLPrefix = wsman
        AllowUnencrypted = false
        Auth
            Basic = true
            Digest = true
            Kerberos = true
            Negotiate = true
            Certificate = true
            CredSSP = false
        DefaultPorts
            HTTP = 5985
            HTTPS = 5986
        TrustedHosts = DellXPS8700
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •