Automation

 View Only
  • 1.  Troubleshooting the profile problem

    Posted Apr 10, 2013 07:37 AM

    hi i need some powershell commands to perform these tasks
    1) Retrieving the list of all servers logged in by user
    2) Deleting the corrupted profile folders and registries in all the servers



  • 2.  RE: Troubleshooting the profile problem
    Best Answer

    Posted Apr 10, 2013 10:57 AM

    I assume you mean logged on to the guest OS running on a VM ?



  • 3.  RE: Troubleshooting the profile problem

    Posted Apr 10, 2013 01:12 PM

    yes i need to login and identify the all the list of all servers logged in by user and delete the corrupted profile folders and registries in all the servers



  • 4.  RE: Troubleshooting the profile problem

    Posted Apr 10, 2013 04:50 PM

    Ok, that means you have to interact with the OS running inside the VM.

    There are many ways to do this;

    • through the Invoke-VMScript cmdlet, but that has a limited set of OS versions on which it is supported
    • via the WMI interface, provided remote WMI connectivity is enabled
    • with PowerShell remoting, but that requires WinRM to be set up inside the guest OS

    Once you can get something running inside the guest OS, and I skip the WMI method for now, you can use some of the available PowerShell scripts available on the different blogs.

    And if you want to use the WMI method, have a look at Use PowerShell to remove local profiles

    I hope this will set you on the right path