Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
Active Directory
Powershell running out of memory?
Last Post 28 Jul 2010 01:24 AM by
Shay Levy
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Ryan
New Member
Posts:3
27 Jul 2010 12:26 PM
I run the following to update our user's employeeID based off of email address:
Import-Csv c:\users.csv | foreach { $employeeID = $_.employeeID Get-QADUser $_.email | Set-QADUser -ObjectAttributes @{employeeID=$employeeID} }
After processing about 1100-1500 users, the script just quits, no error message, just ends. Am I running out of memory? Is there a way to handle that in Powershell?
Thanks!
Ryan
Shay Levy
PowerShell MVP, Admin
Veteran Member
Posts:1362
28 Jul 2010 01:24 AM
Your script looks OK to me. How much memory powershell.exe is consuming? By the way, I know that there was a problem with memory leaks in previous version of QAD, there's a new version now (1.4) , consider upgrading and testing the code again.
Shay Levy
Windows PowerShell MVP
http://PowerShay.com
PowerShell Community Toolbar
Twitter:
@ShayLevy
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
Active Directory
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2