Saturday, 5 January 2019

powershell - Power Shell script to delete the User profiles from the windows server 2008 r2 to local machine(Windows 7)

I tried the following script on a Windows Server 2008 R2 to delete the User Profiles on a Windows 7 client machine.


PS C:\> get-content localcomputer-list.txt | get-userprofile | where {$_.LastUse 'lt (Get-Date).AddDays(-90)}} | remove-userprofile -whatif

It doesn't work.


How do I resolve this?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...