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.
266 questions
0votes
0answers
24views
Powershell function which communicates over TCP to a Zebra printer
I have a Powershell function that communicates over TCP to a Zebra printer: ...
0votes
0answers
133views
PowerShell script for automated Windows health check and repair
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, ...
1vote
0answers
47views
PowerShell script to harvest details of Windows Client & Server platforms
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 ...
0votes
0answers
66views
PowerShell Script to Enumerate AV, Malware & Security Settings on Windows Client & Server Platforms
I wrote a PowerShell script to grab Antivirus Product Status drawing inspiration from this online resource: Get Antivirus Product Status with PowerShell, posted February 22, 2016. Cut down and ...
2votes
1answer
67views
Powershell - Trying to streamline a Get-Service Command
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 ...
0votes
0answers
38views
Upload/download files from/to Discord channel based on last write time
I have created a script which does the following: Compare the last write times between... local save files for the game Valheim and remote save files (Valheim) on a discord channel where I exchange ...
3votes
1answer
108views
Listing first 50 big files in directory and print relative paths and sizes
I use this Powershell command to recursively list first 50 big files in current directory and print relative paths and sizes in MiB. : ...
2votes
1answer
558views
Intune Remediation script to uninstall 7-Zip
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. ...
3votes
1answer
65views
PowerShell Script for Parsing JSON PyPI Package Data and find the latest version
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 ...
3votes
1answer
85views
Powershell script that directly executes python script
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 ...
1vote
1answer
59views
Find all unique file owners through Powershell in an NTFS file system
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: ...
3votes
1answer
50views
Comparing a set of parameters contained in two separate strings in Powershell
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 ...
2votes
1answer
50views
Copying data from a network share to another
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. ...
5votes
2answers
448views
Powershell Export function to create environment variables with bash syntax
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 ...
1vote
1answer
107views
How to tune my powershell script for best practices?
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: ...