Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

removing user profile remotely with powershell

$
0
0

how do I remove a user profile I want with powershell? I do not want to just remove the folder, The correct way will be removing it from system, properties and user profiles. 

I have a citrix farm that I frequently have to query for local profiles and delete them.

Here is the wmi command I run  listing the profiles

Get-WmiObject win32_userprofile -filter "Special='False'" -computer citrix4b,citrix4c,citrix4d,citrix4e | select LocalPath,@{Name="LastUsed";Expression={$_.ConvertToDateTime($_.LastUseTime)}},SID,@{Name="Computernam
e";Expression={$_.__SERVER}} | more

What is the command to delete per user profile.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>