Page 1 of 4 123 ... LastLast
Results 1 to 15 of 53
  1. #1
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts

    CMsPCInfo Program Latest Version

    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.

    CMsPCInfoV30-25.zip

    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
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  2. The Following User Says Thank You to RetiredGeek For This Useful Post:

    BHarder (2017-01-13)

  3. #2
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Fort McMurray, Alberta, Canada
    Posts
    720
    Thanks
    73
    Thanked 99 Times in 92 Posts
    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.


  4. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    B.

    Thanks for the catch here's the revised file: CMsPCInfoV30-25.zip

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

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #4
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,059
    Thanks
    164
    Thanked 194 Times in 187 Posts
    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

    Good to hear about your recovery!
    What do you mean nothing is impossible? I've been doing nothing for years.

  6. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    Access,

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

    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:\path\CMsPCInfoV30-25.ps1 -full

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  7. #6
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,059
    Thanks
    164
    Thanked 194 Times in 187 Posts
    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.
    What do you mean nothing is impossible? I've been doing nothing for years.

  8. #7
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,059
    Thanks
    164
    Thanked 194 Times in 187 Posts
    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: DOMAIN\UserName or COMPUTER\UserName.
    At E:\Malcolm\Documents\Sisko\Scripts\Powershell\CMsPCInfoV30-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:\Malcolm\Documents\Sisko\Scripts\Powershell\CMsPCInfoV30-25.ps1:344 char:32
    +   $CompSysObj = Invoke-Command @ICArgs
    +                                ~~~~~~~
        + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand
    What do you mean nothing is impossible? I've been doing nothing for years.

  9. #8
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    Access,

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

    Here's an updated version with comment based help included:
    Set-PSRemoting.ps1 Set-PSRemoting.zip (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
    Last edited by RetiredGeek; 2017-01-30 at 17:52.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  10. #9
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,059
    Thanks
    164
    Thanked 194 Times in 187 Posts
    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
    What do you mean nothing is impossible? I've been doing nothing for years.

  11. #10
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    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!

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  12. #11
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    2,059
    Thanks
    164
    Thanked 194 Times in 187 Posts
    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.
    What do you mean nothing is impossible? I've been doing nothing for years.

  13. #12
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    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: CMsPCInfo-Files.zip

    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.

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  14. #13
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    24,343
    Thanks
    5
    Thanked 1,207 Times in 1,053 Posts
    RG,

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

    Error1.png
    Error2.png
    Joe

  15. #14
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,980
    Thanks
    424
    Thanked 1,601 Times in 1,451 Posts
    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
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  16. #15
    WS Lounge VIP Browni's Avatar
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    1,752
    Thanks
    39
    Thanked 178 Times in 155 Posts
    It doesn't show much!

    cm.PNG

Page 1 of 4 123 ... LastLast

Posting Permissions

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