Script to query local computer and output if each profile is roaming or local

SteveGrantRogers 1 Reputation point
2022-07-07T18:59:28.263+00:00

I'm able to run a script against AD and check if a user has a local path or not but I want to run a command against a end-user machine and it output each profile on the machine and if its roaming or local. I'm having trouble finding the best way to do this.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,283 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 44,081 Reputation points
    2022-07-07T19:49:56.297+00:00

    Use WMI:

    Get-WMIObject win32_userprofile  
    

    There are three properties of interest:
    RoamingConfigured
    RoamingPath
    RoamingPreference

    0 comments No comments