|
PierreTheMime posted:I'm trying to write a basic set of checks in Powershell to make sure that any given server isn't pegged on resources. We've had a few times recently where servers hung but didn't get reported to us for a long time which held up processing. What would be the best way to monitor CPU/RAM in a way that won't false-report (mostly)? Basically at the end of it I just need the script to return either "Failure" if a server is pegged for a prolonged period (I used 5 minutes) or "Success" if it's fine (I'm using Write-Host because the result is captured in a log). Frankly, the most reliable way to do this might be on an ancient tech, SNMP. I've never checked whether server core has the windows SNMP client available.
|
# ¿ Feb 10, 2018 22:07 |
|
|
# ¿ Apr 28, 2024 22:45 |
|
If it matters to you, using the SNMP client is way, way lighter than polling wmi.
|
# ¿ Feb 10, 2018 22:10 |
|
Posh-SSH is useful.
|
# ¿ Mar 5, 2018 17:26 |
|
The answer, in another language, might be to use a hashtable. To my knowledge PS has nothing like this. Use python? PS is a control and orchestration language; it's not really intended to crunch data quickly.
|
# ¿ Mar 29, 2018 17:26 |
|
cheese-cube posted:PS does have hashtables but this sounds like a data transform problem. I'll agree, there's some data crunching that PS just can't do well and should be moved to a DB but I've processed some pretty large piles of garbage using PS quite efficiently. !!!!! Systems.Collections.Hashtable Hello, handsome
|
# ¿ Mar 29, 2018 17:51 |
|
Yeah, thanks to you and Cheese for pointing that out. There is some deeply convoluted poo poo I'm looking forward to fixing/simplifying Monday
|
# ¿ Mar 29, 2018 18:33 |
|
this thread. Every time someone posts a solution I learn something helpful. Python doesn't open an entire file when preappending text does it?
|
# ¿ Jun 1, 2018 17:15 |
|
Sounds like it should put it in both
|
# ¿ Aug 24, 2018 12:14 |
|
How do you intend to authenticate as an administrator to Windows Remote Management on these machines? Additionally, do you know whether dns in your environment will actually let you resolve those machine names? Lastly, for asynchronous execution with retry/wait options, look at submitting these as powershell "jobs" Potato Salad fucked around with this message at 04:03 on Sep 12, 2018 |
# ¿ Sep 12, 2018 03:58 |
|
Got it, that's much more clear. So...less Shadow IT and more "Hey this is p easy" Next time you're in, do the following to determine whether you're in a domain environment (you almost certainly are) Right mouse click on the Computer icon (in Windows 10, you'll reliably find This PC in a file browser's left column) Select Properties Look under the Computer name, domain In cmd, from another computer, run nslookup thefullnameofthefirstcomputer For example, nslookup rm304-dell8080.ad.happyschool.co.uk That'll tell you whether computers (1) are in a domain (2) have suitable DNS records Potato Salad fucked around with this message at 05:16 on Sep 12, 2018 |
# ¿ Sep 12, 2018 05:12 |
|
server or o365
|
# ¿ Sep 12, 2018 12:30 |
|
The Fool posted:This one-liner should get you a list of everyone with ENTERPRISEPACK.
|
# ¿ Sep 12, 2018 20:44 |
|
The Oracle application isn't using weblogic + Oracle security wallet?
|
# ¿ Sep 17, 2018 16:22 |
|
New Yorp New Yorp posted:That's what I thought. Can't use the IP directly, so I guess I'll either deal with it or build something to safely manipulate entries in the hosts file. Bummer. do you happen to have dsc push or sccm?
|
# ¿ Oct 29, 2018 18:27 |
|
Google Create a forwarding rule and scroll past the Outlook resulta
|
# ¿ Jun 19, 2019 16:23 |
|
Bug #2607 on cyclic dependences probably isn't going to be fixed in ps5.1 It's okay, I I love making weird hacky module manifests
|
# ¿ Jun 26, 2019 19:34 |
|
fishmanpet are you a pester contributor
|
# ¿ Jun 27, 2019 05:00 |
|
Submarine Sandpaper posted:This is a silly one but how can you determine all the stores on a machine eg sqlserver, certificates, registry Like, detect all common locations for storing configurations or data?
|
# ¿ Mar 18, 2020 21:25 |
|
are you basically looking for MS expect ?
|
# ¿ Jun 29, 2020 05:12 |
|
Irritated Goat posted:timeouts on VPN for AD queries consider maintaining your infrastructure from a vm at the relevant site
|
# ¿ Sep 17, 2020 11:54 |
|
Man, gently caress whoever got rid of sccm in an environment where you need weekly patching assurance epm is there to help you MEET compliance requirements, what doofus did that?
|
# ¿ Nov 15, 2020 06:57 |
|
Wizard of the Deep posted:How is the WinRM trusted hosts list distributed? Can you verify that they're the same on all servers? I lean on dsc with [insert any popular config/security management solution here]
|
# ¿ Dec 30, 2020 23:06 |
|
it's kind of cool that people will organically walk into the need for the kinds of structures that people learn in CS classes, where a kid who learns what a hashtable is in CS might never actually use such a structure in their life
|
# ¿ Mar 16, 2022 15:59 |
|
|
# ¿ Mar 24, 2022 07:17 |
|
NPR Journalizard posted:Im trying to use the PowerBI cmdlet to do a survey of the datasets in my tenant. I can get a list of datasets fairly easily with Get-PowerBIDataset, but I also want to get a list of what tables each dataset uses. Supposedly Get-PowerBITable does this, but no matter what parameters I pass, or what login I use, including a service admin account, I cant get anything out of it other than an error message saying not found. out of curiosity, are you the owner proper of any of these datasets?
|
# ¿ Aug 23, 2022 23:40 |
|
|
# ¿ Apr 28, 2024 22:45 |
|
I think you're overthinking this? If you want to make a new user, you cast New-AzureADUser. It....does that. edit: I see what you're asking. Yes, install the graph module and get it connected with your tenant I scrolled through these directions; they look like they should get you installed and connected https://www.alitajran.com/install-microsoft-graph-powershell/ Potato Salad fucked around with this message at 22:16 on Dec 13, 2023 |
# ¿ Dec 13, 2023 22:13 |