|
Replies:
3
-
Pages:
1
-
Last Post:
May 17, 2012 12:23 PM
by: Hans Wurst
|
|
|
Posts:
2
Registered:
5/15/12
|
|
|
|
Script to get users with roaming profile and profile size
Posted:
May 15, 2012 9:45 PM
|
|
|
Hi Guys, I am new to the forum. Need some help getting a list of users with romaining profiles and the profile sizes. First part is easy but i am unable to work out how to get the profile size. I have only managed to do below so far
Get-QADUser -sizelimit 0 | where {$_.profilepath -ne $NULL} | Select-object SamAccountName,profilepath
Can someone please assist. Any assistance will be highly appreciated. Thanks Regards
|
|
|
Posts:
133
Registered:
2/9/12
|
|
|
|
Re: Script to get users with roaming profile and profile size
Posted:
May 16, 2012 12:47 AM
in response to: VicGov
|
|
|
Hi, try this:
Get-QADUser -sizelimit 0 | where {$_.profilepath} | Select-object SamAccountName,profilepath, @{Name="Size";Expression={$colItems = (Get-ChildItem $_.profilepath -recurse | Measure-Object -property length -sum); "{0:N2}" -f ($colItems.sum / 1MB) + " MB" }}
I got the size calculation from here:
http://technet.microsoft.com/en-us/library/ff730945.aspx
Tell me if it worked.
|
|
|
Posts:
2
Registered:
5/15/12
|
|
|
|
Re: Script to get users with roaming profile and profile size
Posted:
May 16, 2012 3:40 PM
in response to: Hans Wurst
|
|
|
Hi Hans, Thanks for you reply, the scripts runs but does not return the size (returns 0.00 MB). E.g below SamAccountName ProfilePath Size -------------- ----------- ---- fb04 \\internal.vic.org\path\Profiles\f... 0.00 MB
Thanks
|
|
|
Posts:
133
Registered:
2/9/12
|
|
|
|
Re: Script to get users with roaming profile and profile size
Posted:
May 17, 2012 12:23 PM
in response to: VicGov
|
|
|
What if you check the foldersize in Explorer ? What size is the profile of fb04 ?
You could also check what the command shows if executed in the console:
Get-ChildItem \\internal.vic.org\path\profiles\..... -recurse | Measure-Object -property length -sum
what is the result ??
|
|
|
|
Legend
|
|
MVP: 2501
+
pts
|
|
Guru: 2001
- 2500
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|