Is My Command Causing Memory Issues on My PC?

0
12
Asked By CuriousCoder93 On

I've been experiencing some memory problems with my PC, and I'm starting to think that it might only happen after a reboot and then sticks around. I ran the following command while I'm trying to pull a large dataset from another server to avoid overwhelming the data source. I'm worried that running this command multiple times could be contributing to my memory issues. Here's the command I used:

"[System.Environment]::SetEnvironmentVariable("Var", ($b), [System.EnvironmentVariableTarget]::User)"

2 Answers

Answered By DataNinja88 On

I think the command you shared looks harmless, but the way you’re using it matters. If `$b` has a massive array or objects, that might lead to memory problems, especially when converting it to JSON. Any chance you can confirm how much data is really being pulled in?

Answered By TechWhiz42 On

Nope, that command by itself won't cause any memory errors. But the variable `$b` that you're using could be a factor. You didn’t mention what’s in that variable, so it’s hard to tell. If it’s storing a huge amount of data (like your list of 30,000 items), that's worth looking into!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.