Skip to main content

Questions tagged [powershell]

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and CIM enabling management of remote Linux systems and network devices.

1 vote
3 answers
100 views

I use PowerShell to retrieve the last two application logs with event ID 654 and calculate the time difference between them. If the time difference between the two logs is more than 30 minutes, I will ...
Cell-o's user avatar
  • 335
2 votes
0 answers
46 views

I'm currently updating a ping script I maintain at work, transitioning from WinForms to WPF. Because of this I've started learning about and incorporating runspaces to keep the GUI responsive during ...
K_P's user avatar
  • 21
0 votes
1 answer
480 views

I've been experiencing frequent issues with my Windows operating system, requiring me to manually run various system health and repair commands (such as DISM, ...
Foad's user avatar
  • 379
2 votes
1 answer
107 views

I'm a support analyst/help desk technician by trade. Here's a little PowerShell script I've cobbled together over the years to harvest details of Windows client and/or server platforms. I use this ...
Pendraig's user avatar
2 votes
1 answer
95 views

This is part of a larger script but, I feel like this part could be streamlined a bit. The code currently works but I feel like doing a Get-Process call twice is ...
RKillcrazy's user avatar
3 votes
1 answer
161 views

I use this Powershell command to recursively list first 50 big files in current directory and print relative paths and sizes in MiB. : ...
SebMa's user avatar
  • 131
2 votes
1 answer
678 views

I just wanted to have some advice on those remediation scripts; what do you think? The idea is to detect every 7-Zip installed on the computer and search for those not up to date and uninstall them. ...
S. Me's user avatar
  • 23
3 votes
1 answer
84 views

Following this post, I have a PowerShell script that aims to interact with the Python Package Index (PyPI) to find the latest release of a specified package that is compatible with the current Python ...
Foad's user avatar
  • 379
3 votes
1 answer
112 views

Wrote this script after having some problems with clients on Win10 and consequent necessity to ship ultra-bloated .exe file of Python project over the Web to them. This is my first try to write ...
MaxiMaxi's user avatar
  • 177
1 vote
1 answer
79 views

I'm trying to find all unique file owners in an NTFS file system. Getting the number is fairly straightforward, but my current approac is very inefficient: ...
Tanaka Saito's user avatar
3 votes
1 answer
62 views

I have a situation where I need to compare two strings with each other in a foreach loop that potentially run over millions of rows of data. The two strings will always contain between 1 and 12 ...
Tanaka Saito's user avatar
2 votes
1 answer
68 views

The code below copies large amount of data. It does so in 2 steps. I was wondering if both step1 and step2 can be done in parallel. ...
Newborn's user avatar
  • 21
5 votes
2 answers
493 views

A lot of the time when working in DevOps, documentation and code snippets from colleagues will be based on bash. Most of those same commands work seamlessly in PowerShell; but setting environment ...
JohnLBevan's user avatar
  • 1,419
2 votes
1 answer
140 views

I have written a script for CVE-2023-24932 like below. But I want to improve my script. I am open to new ideas. Here is my script: ...
Cell-o's user avatar
  • 335
1 vote
1 answer
64 views

I'm using a script to monitor a file. When a pattern is detected, it will send an email to notify someone. I am creating a Windows Service via NSSM. My question is : How can I improve performance of ...
Cell-o's user avatar
  • 335

15 30 50 per page
1
2 3 4 5
18