Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8078045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:40:00+00:00 2026-06-05T15:40:00+00:00

I need to check some settings for all users on Windows clients in the

  • 0

I need to check some settings for all users on Windows clients in the network. All users have roaming profiles.

I have written a Powershell script that loads an offline copy of a users’ NTuser.dat and reads out the specific keys. Then the file is unloaded and the next one is loaded into the registry.

The problem is that after about 10 users no new files are loaded. When the script is launched again the users still don’t load. New users are only after I close the Powershell prompt and open a new one. The script always stalls after about 10 users.

$userlist = ls "C:\Temp calls\profiles"
foreach ($user in $userlist){
$username = $user.name
#$username = "ciproda"
reg load "hklm\$username" "C:\Temp calls\profiles\$username\NTUSER.DAT" | Out-Null
...

    Here I check the keys

    ...

[gc]::collect()
start-sleep -s 3
reg unload "hklm\$username"
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:40:02+00:00Added an answer on June 5, 2026 at 3:40 pm

    In your section ‘Here I check the keys‘, are you mounting the hive as a PS drive using something like:

    new-Psdrive -name <blah> -PSProvider Registry -root <blih>
    cd <blah>:
    # Some Set-ItemProperty and Get-ItemProperty calls here referring to
    # your PSDrive and using PowerShell variables
    Remove-PSDrive <blah>
    

    If you still have references to some of your PSDrive variables before calling REG UNLOAD, that call might fail. Try to remove all variables that would still refer to your PSDrive through Remove-Variable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 repositories in my settings.xml because I need artifacts from all of
I need to check in some fast way if there is any text nodes
For some reason I need to check in a couple of files in the
In some of my tests i need to check the order of Lists and
I need to check whether a string contains any swear words. Following some advice
I need to check specific positions in an NSArray to see if they have
I have an application where i need to check whether the username and password
I am writing a powershell script to set up some HyperV VM's however there
I need to check whether a given date is in the preceding month for
I need to check if a database is totally empty (no tables) using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.