0

I currently have a script that will delete a profile, or multiple off a local or remote PC. What I use at the moment to do so is Remove-CimInstance against the win32_userprofile class for a specific user. So the question is…

Is there a way to see the actual deletion stream of the actual deletion in progress?

I would ultimately want to add the stream to the progress bar, as a sub-progress_bar for deleting multiple profiles, if that makes sense.

Something like:

*Username profile deleting*
[===1/4.          ] #Profile it's on.
   [===========84%.   ] #deletion progress for that profile.

Anyone familiar on how to do this? I currently have the profile deletion script posted here.


Wanted to keep the post relevant to the question, but the script works to delete local, or remote profiles of the system. Feel free to give it a try (it's based off a domain environment though).

7
  • 1
    there is zero feedback on profile deletion. that means the only thing you could indicate is the current of total info.
    – Lee_Dailey
    Commented May 19, 2021 at 13:32
  • aww man! [sad grin]. that's what i currently have in the script. Commented May 19, 2021 at 13:40
  • Was hoping someone out there new something about it. Usually see people being able to attach to a stream handle? not sure if im saying that right. Commented May 19, 2021 at 13:47
  • 1
    unless you want to write a 2nd process that monitors the file list in each target to calc your progress ... there just aint any graceful way to get the info you would need. not only that, but i suspect that you would slow things down if you inserted some sort of monitoring process.
    – Lee_Dailey
    Commented May 19, 2021 at 16:21
  • 1
    please post your solution as an Answer ... that way, folks can up-vote it. you can post the Answer, upvote it, AND mark it as accepted ... [grin]
    – Lee_Dailey
    Commented May 19, 2021 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .