Kaseya Community

Script to List User Profiles

  • Does anyone have a script that will list all the User Profiles on a PC and the Size of each Profile? I've found a script to list the profiles but I have not been able to find out how to list the Size of the Profiles.

    Thanks!

    Legacy Forum Name: Script to List User Profiles,
    Legacy Posted By Username: billmccl
  • Here is one that will do XP and Vista, it saves it to the documents tab when you click on the agent icon.

    It uses du.exe from http://technet.microsoft.com/en-us/sysinternals/bb896651.aspx


    Script Name: Profile sizes
    Script Description: Get size of profile folder.
    michael.strand@nt-tech.com.au

    IF True
    THEN
    Get Variable
    Parameter 1 : 4
    Parameter 2 :
    Parameter 3 : agtDrv
    OS Type : 0
    Write File
    Parameter 1 : #agtDrv#\Windows\System32\du.exe
    Parameter 2 : VSASharedFiles\du.exe
    OS Type : 0
    Execute Shell Command
    Parameter 1 : du.exe /accepteula
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : du -l 1 c:\users >> #vAgentConfiguration.AgentTempDir#\profiles.txt
    Parameter 2 : 1
    OS Type : 10
    Execute Shell Command
    Parameter 1 : du -l 1 "c:\Documents and Settings" >> #vAgentConfiguration.AgentTempDir#\profiles.txt
    Parameter 2 : 1
    OS Type : 8
    Get File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\profiles.txt
    Parameter 2 : ..\Docs\profiles.txt
    Parameter 3 : 3
    OS Type : 0
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\profiles.txt
    OS Type : 0
    ELSE




    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: michael.strand@nt-tech.com.au
  • Do you happen to know why the Profile "Folder Size" is so different than the System Properties> User Profiles "Profile Size"? What's not included in the System Properties Size?

    Thanks!!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: billmccl