News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • CMsPCInfo Program Latest Version

    Posted on RetiredGeek Comment on the AskWoody Lounge

    Home Forums Developers, developers, developers DevOps Lounge CMsPCInfo Program Latest Version

    Viewing 48 reply threads
    • Author
      Posts
      • #507940 Reply
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I haven’t posted a new version in quite a while (had to start a new thread) so here’s the latest version 30.25.

        46399-CMsPCInfoV30-25

        Yes, it’s from September 16 but between travel and surgery that’s the last time I worked on it.

        FYI: Here’s a link to the original thread.

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1588849 Reply
        bharder
        AskWoody Lounger

        Still looking good RG!

        I have one minor request. There are a couple of typos in the V30-25 code, “privileges” is spelled “privleges” in this script. That needs touching up.

        I hope you have recovered well from your surgery.

        :^_^:

      • #1588870 Reply
        RetiredGeek
        AskWoody MVP

        B.

        Thanks for the catch here’s the revised file: 46440-CMsPCInfoV30-25

        I’ve recovered just swimmingly! Tuesday will be 3 months out and the knee is functioning perfectly! Thanks for asking.

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1589792 Reply
        access-mdb
        AskWoody MVP

        RG, I’m having problems running this script. I’m running Powershell as an administrator. When I run the script it asks for computer[0]. If i just hit enter it stops. If I enter the computer name it starts up with the message it’s running then the window appears. But a lot of the info is missing. Looking in the PS window there’s loads of errors – but I suspect the first one is generating all the others. It says that it can’t connect to the remote server and specifies my computer’s name and gives an errorcode of 0x8009030e. I very much suspect I’m doing something wrong :p

        Good to hear about your recovery!

      • #1589800 Reply
        RetiredGeek
        AskWoody MVP

        Access,

        Try running this program on all your machines. 46539-Enable-PSRemoting

        You might also want to read the help either by loading the script into a text editor or using the get-help command, e.g.

        get-help d:pathCMsPCInfoV30-25.ps1 -full

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1589970 Reply
        access-mdb
        AskWoody MVP

        Sorry for the delay, I’ve been a bit busy. I had already run the zipped program but I ran it again. I still get the error, stating it can’t get to the remote computer. But I’m specifying the local host computer. Your help says running the script without parameters gets info from the local computer, and that’s what I’m trying to do. If I try using the -Computers parameter it also fails the same way. Sorry to be such a pain – the script was working in its previous incarnations.

      • #1590084 Reply
        access-mdb
        AskWoody MVP

        For a bit more info, I ran CMsPCInfo.ps1 from July 2016 and it worked fine. As far as I can see the code getting the computer name as default is identical and using the command Get-Childitem env:computername, it gives me the name of my computer. But it still says it’s a remote server. Below is the first error – there’s lots of others but I think they’re caused by this first one.

        Code:
        New-PSSession : [USS-DEFIANT] Connecting to remote server USS-DEFIANT 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: DOMAINUserName or COMPUTERUserName.
        At E:MalcolmDocumentsSiskoScriptsPowershellCMsPCInfoV30-25.ps1:3211 char:9
        +   $CS = New-PSSession -ComputerName “$CompName”
        +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo          : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
            + 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 E:MalcolmDocumentsSiskoScriptsPowershellCMsPCInfoV30-25.ps1:344 char:32
        +   $CompSysObj = Invoke-Command @ICArgs
        +                                ~~~~~~~
            + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
            + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
      • #1590107 Reply
        RetiredGeek
        AskWoody MVP

        Access,

        Did you run the Enable-PSRemoting program in post#5?

        Here’s an updated version with comment based help included:
        Set-PSRemoting.ps1 46582-Set-PSRemoting (note name changed to avoid conflict!)

        It should show as a remote as I had to do this go get it to do both local and remote computers w/the same code. The program was very bloated (it’s still pretty long) when I had it checking for local vs remote for almost every operation and running different code for each.

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1590128 Reply
        access-mdb
        AskWoody MVP

        RG, yes I did run the enabling script (I said this in #6;);) and I’ve run it a couple of times now. I’ve also run the set remoting script as well, but no change to the problem. What I don’t understand is that the code that finds the computer name is the same in both CMsPCInfo.ps1 and CMsPCInfoV30-25.ps1 but it doesn’t ask for the computer name in the older one (which works fine) but does in the latest one (which doesn’t work). $Env:computername holds the correct name as well.

        Code:
        Param (
          [Parameter(Mandatory=$True)]
            [String[]] $Computers = “$Env:COMPUTERNAME”,
          [Parameter(Mandatory=$False)]
            [Switch] $Quiet,
          [Parameter(Mandatory=$False)]
            [Switch] $ClearLog,
          [Parameter(Mandatory=$False)]
            [Switch] $AutoList
      • #1590130 Reply
        RetiredGeek
        AskWoody MVP

        Access,

        I’m away from my computer for most of the day today. However, I think I may have spotted the error.

        In the code above try changing the $True to $False.

        That will stop it from asking from asking for the computer name and use the default in $env:COMPUTERNAME.

        It’s a debug setting I apparently forgot to change in the posted file. If that doesn’t fix it I’ll get right on it when I return home later today.

        Thanks again for testing! :clapping:

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590131 Reply
        access-mdb
        AskWoody MVP

        Actually I noticed that was different so I made the change and tried it, but to no avail. Just tried it again and it didn’t ask for the computer name (I can’t remember if that happened last time), but it still says it’s a remote server. I would have thought one of the others might have had the same problem. It would be useful to know if anyone has run the script without any issues.

      • #1590181 Reply
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        We need another tester to confirm the problem with this code as I can’t get it to error and Access can’t get it to run.
        We need someone who only has a single machine not attached to a Peer-to-Peer Network or Domain.

        Hope there is someone out there that can give it a go.

        Here’s the latest version in zip format: 46594-CMsPCInfo-Files

        Note: there are two files make sure both are run from a PowerShell Console that is RunAsAdministrator!
        Make sure you run the Set-PSRemoting.ps1 file FIRST and only ONCE.

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1590187 Reply
        joep517
        AskWoody MVP

        RG,

        I get the two attached errors. I open the PS1*file in Notepad, copy it all, then paste into PowerShell.

        46599-Error1
        46600-Error2

        --Joe

        Attachments:
        • #1590189 Reply
          RetiredGeek
          AskWoody MVP

          Joe,

          Thanks for testing!

          Don’t know where those came from. Could you try running it from the file?

          Place files in your default PS directory.
          Start PS as Admin then type:

          Code:
          .Set-PSRemoting.ps1
          
          .CMsPCInfo-PSDev3.ps1
          

          Thanks :cheers:

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

      • #1590208 Reply
        browni
        AskWoody MVP

        It doesn’t show much!

        46601-cm

        Attachments:
        • #1590212 Reply
          RetiredGeek
          AskWoody MVP

          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! :cheers:

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

      • #1590214 Reply
        access-mdb
        AskWoody MVP

        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…

      • #1590217 Reply
        browni
        AskWoody MVP

        The errors didn’t appear until I clicked exit <<[/CODE]

      • #1590221 Reply
        joep517
        AskWoody MVP

        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.

        46603-CMsPCInfoV30-30-for-My-pc

        --Joe

        Attachments:
      • #1590224 Reply
        joep517
        AskWoody MVP

        Oops. Forgot to look at the PowerShell window. I’ve attached the errors from there.
        46608-PS_errors

        --Joe

        Attachments:
      • #1590225 Reply
        RetiredGeek
        AskWoody MVP

        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! :angry:

        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: 46602-CMsPCInfoV20-20 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.

        46604-CMsPCInfoV30-30-for-DELLXPS8700
        46605-CMsPCInfoV30-30-for-DELL137000JLT
        46606-CMsPCInfoV30-30-for-DELLXPS14Z
        46607-CMsPCInfoV30-30-for-BRUCESLT1564

        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.

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1590226 Reply
        access-mdb
        AskWoody MVP

        Success! It worked as expected. I just ran it without any parameters.

      • #1590228 Reply
        RetiredGeek
        AskWoody MVP

        Access,

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

        Thanks for testing! :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590229 Reply
        access-mdb
        AskWoody MVP

        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).

      • #1590231 Reply
        browni
        AskWoody MVP

        Ran as admin here

        46609-CMsPCInfo-for-IAN-W10

        Attachments:
      • #1590267 Reply
        RetiredGeek
        AskWoody MVP

        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. :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590270 Reply
        joep517
        AskWoody MVP

        RG,

        FWIW, I’m running current Insider preview build 15019.

        --Joe

      • #1590305 Reply
        RetiredGeek
        AskWoody MVP

        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? :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590307 Reply
        browni
        AskWoody MVP

        Only thing I have changed from standard is the workgroup name.

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

      • #1590310 Reply
        RetiredGeek
        AskWoody MVP

        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
        

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590311 Reply
        access-mdb
        AskWoody MVP

        I don’t use homegroup and I also am not aware of stopping any services (though I’m not sure which ones you’re meaning).

      • #1590312 Reply
        browni
        AskWoody MVP
        Code:
        Windows PowerShell
        Copyright (C) 2016 Microsoft Corporation. All rights reserved.
        
        PS C:WINDOWSsystem32> winrm s winrm/config/client ‘@{TrustedHosts=”Ian-W10″}’
        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 = Ian-W10
        
        PS C:WINDOWSsystem32>
        
        
        
        
        
      • #1590317 Reply
        joep517
        AskWoody MVP

        Here’s my results:

        Client
        NetworkDelayms = 30000
        URLPrefix = wsman
        AllowUnencrypted = false
        Auth
        Basic = true
        Digest = true
        Kerberos = true
        Negotiate = true
        Certificate = true
        CredSSP = false
        DefaultPorts
        HTTP = 5985
        HTTPS = 5986
        TrustedHosts =*my-pc-name

        --Joe

      • #1590318 Reply
        access-mdb
        AskWoody MVP

        Mine is the same as Ian’s, bar the PC name of course.

      • #1590562 Reply
        joep517
        AskWoody MVP
      • #1590565 Reply
        RetiredGeek
        AskWoody MVP

        Joe,

        Thanks,

        I’ve been through those and my book Mastering PowerShell and still I can’t figure why this works on my machines and nobody else’s!

        Today I tried, via TeamViewer, to run the program on my cousins machine with same results 20-20 works 30-20 doesn’t! I even tried to initiate an interactive session via Enter-PSSession and that also failed. This was after entering Enable-PSRemoting -Force -SkipNetworkProfileCheck.

        I’m Stumped! :angry:

        Thanks again for the references. :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590580 Reply
        joep517
        AskWoody MVP

        Everything sure seems to point to an authentication issue. Have you done any changes to authentication?

        --Joe

        • #1590607 Reply
          RetiredGeek
          AskWoody MVP

          Everything sure seems to point to an authentication issue. Have you done any changes to authentication?

          Joe,

          Not to my knowledge. The only thing I have setup up is that there is the same account on all my machines (UserId & PW) and the Users Documents folders (which have been moved to the G: drive on all machines) are shared. Both HomeGroup services are disabled and standard networking is in use.

          :cheers:

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

      • #1590626 Reply
        joep517
        AskWoody MVP

        Are you only using a local user or is it*a Microsoft account?*

        --Joe

      • #1590636 Reply
        RetiredGeek
        AskWoody MVP

        Joe,

        No MS Accounts I had to much trouble networking when I had a MS Account on the Insider Ed. laptop. All machines using local accounts w/same UID & PW!

        I’m planning, when I get the time, to do a Win 10 Reset, after taking an image, and see what happens on a clean install and try to work from there.

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590689 Reply
        joep517
        AskWoody MVP

        Can you still switch to an*MSA on the laptop?

        --Joe

      • #1590698 Reply
        RetiredGeek
        AskWoody MVP

        Joe,

        I guess I could.

        This morning I took an Image and then did a reset w/keep files.
        Versions 18.7, 20.20,20.21 all worked on the Local machine.

        Version 30.30 Failed on the New-PSSession command.
        Turned on network discovery – Failed
        Changed to advanced sharing and shared Documents folder w/authorized users. – Failed

        Ran My Enable-PSRemoting.ps1 file – Success
        Unshared Documents – Success
        Turned off Discovery – Success
        Rebooted J-I-C – Success

        I’m now in the process of doing another refresh. My plan is to try to run the program out of the box. If that fails I’ll run the Enable-PSRemoting.ps1 file (I do need to change that name to not conflict with the cmdlet!).

        More to come… :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        • #1590727 Reply
          RetiredGeek
          AskWoody MVP

          [Quote]Note: the old version that worked before will no longer work when trying to get to the refreshed laptop from my desktop telling me that the RPC server can not be contacted. I’m sure that is the network settings but will check.[/Quote]

          Changing the Laptop to Use Userid/Passwords to connect to other PCs AND Allow Printer & File Sharing fixed that problem as I thought it would, e.g. No HomeGroups!

          Now version 30-30 works both locally on the refreshed laptop and remotely from my desktop!

          Success, here at least. Hopefully, somebody out there will be able to replicate my results with the above information.

          :cheers:

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

          • #1590729 Reply
            browni
            AskWoody MVP

            It runs but throws lots of errors

            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: DOMAINUserName or
            COMPUTERUserName.
            At D:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:3170 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:500 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:549 char:32
            +   $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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:553 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:571 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:643 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:696 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:701 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:750 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:751 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:778 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:812 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:819 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:824 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:840 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:878 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:888 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:890 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:925 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:934 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2560 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:995 char:33
            +    $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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:999 char:16
            +  $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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1023 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1058 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1121 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1267 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1269 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1281 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1300 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1362 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1375 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2722 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1402 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1422 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1448 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2422 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2672 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1625 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1626 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1647 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1719 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1725 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1738 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1918 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1936 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1940 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1953 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1972 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1974 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:1988 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2042 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:DownloadsCMsPCInfo-PSDev4CMsPCInfo-PSDev4.ps1:2112 char:31
            +    $colItems = Invoke-Command @ICArgs
            +                               ~~~~~~~
                + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
                + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
            
            
            Attachments:
      • #1590720 Reply
        RetiredGeek
        AskWoody MVP

        It gets interestinger and interestinger!

        Completed a second Refresh and now the program works directly out of the box on the Local Machine!

        Of course I can’t connect to that machine from my desktop unless I change the network settings. At least this is what I would have assumed! It works although I do get a rather disconcerting message:

        Code:
        WARNING: Cannot connect to DellXPS14z. Find out if it exists. If so, ensure it i
        s online or check whether it is affected by firewall settings.
        

        Here’s the output file to prove it: 46649-CMsPCInfoV30-30-for-DELLXPS14Z

        Here’s the version I’m using for testing: 46650-CMsPCInfo-PSDev4

        Note: the old version that worked before will no longer work when trying to get to the refreshed laptop from my desktop telling me that the RPC server can not be contacted. I’m sure that is the network settings but will check.

        So now I’m at a total loss! IDEAS? :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
      • #1590731 Reply
        joep517
        AskWoody MVP

        I get the same results as before. I am now running build 15031.

        --Joe

      • #1590741 Reply
        RetiredGeek
        AskWoody MVP

        Brownie & Joe,

        Just finished loading ..031 and the Version 30-30 runs both locally and over the lan from my dekstop.

        Advanced Network Settings:
        — Laptop running 15032 —
        Turn on network discovery.
        Turn on File and Printer sharing.
        Allow Windows to manage homegroup….
        HomeGroup Listener set to Manual and Not currently running
        HomeGroup Provider set to Manual(Trigger Start) and currently RUNNING!

        — Desktop running 14393 —
        Turn on network discovery.
        Turn on File and Printer sharing.
        Use user accounts and passwords to connect to other computers.
        HomeGroup Listener & HomeGroup Provider Services Disabled

        Both machines have an administrator account with the same userid/password combination.

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #1590747 Reply
        joep517
        AskWoody MVP

        My network settings are the same as your laptop settings. I am running using a Microsoft Account in the admin group.

        --Joe

      • #1591520 Reply
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I think I have this thing figured out but I’ll need some testing to confirm.

        Here’s what I did to track down the problem:
        [List=1]
        [*]Did a fresh install of Win 10 Pro Insider 16025 (latest ISO I could find). I actually killed the partitions to insure I got a clean slate. The only settings that were changed are those shown below.
        [*]Set-PSRemoting RemoteSigned
        [*]Ran version 30-30 and received error on Set-WSManQuickConfig…”One connection type set to public”
        [*]Changed to Private via Settings, e.g. Allow discovery!
        [*]Run #2 $CS=New-PSSession -ComputerName … caused error.
        [*]Run in debug mode and determined that the check for WSMan passing when I was expecting it to fail.
        [*]Removed test for WSMan and just allowed Enable-PSRemoting to run reguardless.] *—Success—*
        [*]Run #3 provided the name of another computer on the local network – Failed – But the program caught this and provided the appropriate error message. I use Home as my workgroup name and windows defaults to Workgroup. Changed workgroup to Home.
        [*]Run #4 can now access other computers on the network.
        [*]I was getting everything but I still got an error message, from the program, that the remote computer was unaccessible!
        [*]Run again in debug mode stepping through the program. Turns out the code for getting the Windows Update settings was causing this problem. Strangely enough this worked fine when run locally on the same computer :confused:
        46751-PCINFO-HomeGroupOn-FileSharingOff
        [*]Knowing this worked on my network I changed the advanced sharing settings to Allow Printer and File sharing and Use user accounts and passwords to connect to other computers. —Success— Why this works I surely don’t know but it does.
        46752-PCINFO-HomeGroupOff-FileSharingON
        [/List]

        I plan on working on the code for accessing the WU settings, I borrowed that code, but first I’d like to get another round of testing to verify my tests work out in the wild.

        The new program no longer requires any setup program just run it as Administrator with the settings as shown above and in the comments.

        Dev-CMsPCInfo.ps1 46750-Dev-CMsPCInfo This is version 40-40 BTW.

        Thanks again for testing.

        :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
        1 user thanked author for this post.
      • #1591574 Reply
        access-mdb
        AskWoody MVP

        Hi RG, just tried it straight (no changes and no parameters) and still had the network error – saying this computer is unreachable. Set ‘use user accounts…’ to on, but with a subtly different error

        New-PSSession : [USS-DEFIANT] Connecting to remote server USS-DEFIANT 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.

        I haven’t tried it with my other PC on the network switched on – should I do so?

        You must be learning a lot about Powershell!

        • #1591593 Reply
          RetiredGeek
          AskWoody MVP

          Access,

          It should not make a difference if other computers on the network are turned on or not as long as you aren’t trying to get the program to work on them. Thanks for testing! :cheers:

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

          • #1591594 Reply
            browni
            AskWoody MVP

            Hmmm…

            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: DOMAINUserName or
            COMPUTERUserName.
            At D:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:3163 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:352 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:426 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:428 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:446 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:474 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:506 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:555 char:32
            +   $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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:559 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:577 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:649 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:702 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:707 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:756 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:757 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:784 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:818 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:825 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:830 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:846 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:884 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:894 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:896 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:931 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:940 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2566 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1001 char:33
            +    $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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1005 char:16
            +  $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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1029 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1064 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1127 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1273 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1275 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1287 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1306 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1368 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1381 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2728 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1408 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1428 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1454 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2428 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2678 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1631 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1632 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1653 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1725 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1731 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1744 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1924 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1942 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1946 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1959 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1978 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1980 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:1994 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2048 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:2118 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:DownloadsDev-CMsPCInfoDev-CMsPCInfo.ps1:3167 char:29
            +   Remove-PSSession -Session $CS
            +                             ~~~
                + CategoryInfo          : InvalidData: (:) [Remove-PSSession], ParameterBindingValidationException
                + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemovePSSes
               sionCommand
            
            PS D:DownloadsDev-CMsPCInfo>

            46758-cm2102

            Attachments:
      • #1592893 Reply
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I’ve thrown in the towel on this on and have created a version just for the local pc. You can find thethread for that program here.

        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

      • #2286734 Reply
        b0n3v
        AskWoody Plus

        Hey Y’all,

        I think I have this thing figured out but I’ll need some testing to confirm.

        Here’s what I did to track down the problem:
        [List=1]
        [*]Did a fresh install of Win 10 Pro Insider 16025 (latest ISO I could find). I actually killed the partitions to insure I got a clean slate. The only settings that were changed are those shown below.
        [*]Set-PSRemoting RemoteSigned
        [*]Ran version 30-30 and received error on Set-WSManQuickConfig…”One connection type set to public”
        [*]Changed to Private via Settings, e.g. Allow discovery!
        [*]Run #2 $CS=New-PSSession -ComputerName … caused error.
        [*]Run in debug mode and determined that the check for WSMan passing when I was expecting it to fail.
        [*]Removed test for WSMan and just allowed Enable-PSRemoting to run reguardless.] *—Success—*
        [*]Run #3 provided the name of another computer on the local network – Failed – But the program caught this and provided the appropriate error message. I use Home as my workgroup name and windows defaults to Workgroup. Changed workgroup to Home.
        [*]Run #4 can now access other computers on the network.
        [*]I was getting everything but I still got an error message, from the program, that the remote computer was unaccessible!
        [*]Run again in debug mode stepping through the program. Turns out the code for getting the Windows Update settings was causing this problem. Strangely enough this worked fine when run locally on the same computer :confused:
        46751-PCINFO-HomeGroupOn-FileSharingOff
        [*]Knowing this worked on my network I changed the advanced sharing settings to Allow Printer and File sharing and Use user accounts and passwords to connect to other computers. —Success— Why this works I surely don’t know but it does.
        46752-PCINFO-HomeGroupOff-FileSharingON
        [/List]

        I plan on working on the code for accessing the WU settings, I borrowed that code, but first I’d like to get another round of testing to verify my tests work out in the wild.

        The new program no longer requires any setup program just run it as Administrator with the settings as shown above and in the comments.

        Dev-CMsPCInfo.ps1 46750-Dev-CMsPCInfo This is version 40-40 BTW.

        Thanks again for testing.

        :cheers:

        Hello, this script look intresting. How can i download the script for test, attachment gives me error… Can you share on cloud or something. Thanks.

        .

      • #2286775 Reply
        b0n3v
        AskWoody Plus

        Sorry for the upping this old thread.. This is the latest version which can be used over network/domain? I use the first script 1.0b and i’m happy, but this look much better. Thanks!

      • #2286970 Reply
        RetiredGeek
        AskWoody MVP

        Hey Y’all,

        I got a PM from bOn3v asking about my program and then today one from Woody asking about it. I stopped development of the Network version as too many people were having problems setting up PowerShell Remoting and blaming the problems on the program. So I went forward just making it work on the Local PC, stripping out all of the code for remoting also made the program simpler to maintain.

        You can still run the program on a remote computer if you have it on a shared drive and run it via a PS Remote Session. The only problem will be where the file, if you choose that option, will be written. The code could be easily changed to write it to a shared location.

        Here’s the latest version of the code: CMsLocalPCInfoW10
        .zip MD5 Hash: 25FFA044D2CDFBC898EB406F23F646D6
        .ps1 MD5 Hash: 1A9DBC53FBFFE23C0B126A57A4EDBF40

        HTH ๐Ÿ˜Ž

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
        • #2287415 Reply
          wavy
          AskWoody Plus

          403 Forbidden
          nginx

          Links non functional RG

          ๐Ÿป

          Just because you don't know where you are going doesn't mean any road will get you there.
          • #2287421 Reply
            RetiredGeek
            AskWoody MVP

            Wavy, something is wrong with the link functionality, not sure what as I’m creating them the way I always did. However, you can get the download by clicking the link under Attachments.

            HTH ๐Ÿ˜Ž

            May the Forces of good computing be with you!

            RG

            PowerShell & VBA Rule!
            Computer Specs

            • #2287422 Reply
              PKCano
              Da Boss

              The links aren’t working right.
              We have reported it to the Devs.
              At this point, there isn’t a known ETA for a fix.

    Viewing 48 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: CMsPCInfo Program Latest Version

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.