Questions tagged [powershell]

Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

Filter by
Sorted by
Tagged with
1 vote
0 answers
60 views

I was fooled into running this on powershell - how compromised am I?

Here is a link to the script: hxxps://extract-offline.tools/bip And here was the instructions given to fool me: https://medium.com/@article-343624/convert-tool-f894f6244d4f I ran iex "& { $(...
zerthimon's user avatar
0 votes
1 answer
30 views

Create new partition in all computers in the domain

I want to create new partition in all domains laptops, I have scripts but it’s running every time when the laptop starts up ,so is there any way to create new partition just once in all computers?
Abadi 's user avatar
0 votes
0 answers
14 views

Insert text in Powershell prompt using control sequence ("chord")

I have a fzf script that lists all branches that satisfy some requirement. It looks like this: function gbr { $b = git branch -a $sel = echo $b | ... some processing ... | fzf echo $sel } ...
Fedja's user avatar
  • 1
-1 votes
0 answers
33 views

How to see all IP Addresses in the same LAN as mine? [duplicate]

I need to see the IP addresses of PCs in same LAN as mine (work LAN) to connect to my colleague's PC with SSH. I'd like to use PowerShell or Command Prompt.
EvrestRGB's user avatar
0 votes
1 answer
21 views

Create a archive split into blocks of a maximum size using Windows shell

As example. I want to compress a directory of 100GB split into 10 archives of 10GB using cmd or powershell, non-interactive without installing additional tools. Using tar would be awesome but ...
unixcandles's user avatar
1 vote
1 answer
26 views

How to change the logon account of a service (available in services.msc) in windows and start the service using powershell

I'm trying to create a script that should change the logon account and start the service with the new account credentials added. I have tried to write the following script and when I run the script ...
mohan 's user avatar
  • 21
0 votes
1 answer
46 views

Windows Registry Shows Windows 10 Pro Despite Running Windows 11 Pro

My laptop is running on Windows 11 Pro, and the system settings indeed confirm that it's running Windows 11 Pro. However, when I use PowerShell to query the registry for the Windows version powershell ...
LuckyCoder3607's user avatar
0 votes
1 answer
75 views

What secure erase in the fastest way on Windows 10 with cmd? [duplicate]

I have a program in QT, C++ and I want to secure erase the computer after a trigger. After this process, I do not want the old data on the SSD to be accessed by data recovery programs. I want this ...
mrhndsm's user avatar
1 vote
0 answers
21 views

VS Code IntelliSense not working for Modules (PowerShell 5.1)

I know a lot of people are reporting various issues with vscode intelliSense and that the feature is buggy at best(?), but I'll still try to ask a question. Because - it has, for the most part, worked ...
Morten's user avatar
  • 133
0 votes
0 answers
38 views

Need help creating local user accounts on 6 remote computers in a Windows workgroup

I am trying to create a simple script that prompts a local admin user to create a local user account on 6 remote computers in a Windows Workgroup. The script should prompt for the name of the user, ...
From USofA's user avatar
-1 votes
1 answer
49 views

Uninstall SourceTree using cmd or powershell

I would like to use cmd or powershell commands to uninstall SourceTree from windows 10 machines on my network. The reason I need a terminal way is that I have to do this remotely and simultaneously ...
Kristi Begaj's user avatar
3 votes
1 answer
33 views

How can I enable the Windows Mobile Hotspot via PowerShell?

I'm seeking assistance with enabling the Mobile Hotspot feature on Windows 11 through PowerShell. My Wi-Fi adapter does not support the traditional hostednetwork feature used by the netsh wlan ...
Yox's user avatar
  • 177
-3 votes
2 answers
61 views

Unexpected token '(' in expression or statement

$TargetEmails | Where-Object { $_.contains ( $TargetHeader ) } Error: Unexpected token '(' in expression or statement. I've tried using "$TargetHeader", '$TargetHeader', { ( $.contains ( )...
trblshootr's user avatar
-1 votes
0 answers
49 views

Powershell POST to Pushgateway

What is the powershell command equivalent to: $ echo 'metricname1 101' | curl --data-binary @- http://localhost:9091/metrics/job/jobname1/instance/instancename1 https://github.com/prometheus/...
dsamy's user avatar
  • 1
0 votes
0 answers
26 views

Task Scheduler executing PowerShell script with some errors

I created one task with high privileges C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "D:\OneDrive\OneDrive - HAJJAJ\SCRIPTS\01_Hourl_Stock_From_ERP.ps1&...
HAJJAJ's user avatar
  • 121
-1 votes
0 answers
40 views

Change the Font of Windows Terminal Session Using `PowerShell`

Is there a way to change the Font using in a Windows Terminal session (Tab) using PowerShell? I know how to set a font for a profile in Windows Terminal, yet in this case I'm looking for a way to ...
Royi's user avatar
  • 547
-2 votes
1 answer
57 views

Video to geotagged images using powershell

I have a .mp4 from a GoPro with a gpstrack included. Now I am trying to extract a geotagged image sequence from that video. For that i am currently using ffmpeg and exiftool (I'm open to better ...
e-shirt's user avatar
  • 105
0 votes
1 answer
46 views

Powershell, file.exe --help output not redirectable

I'm attempting to redirect the output of the help message from a binary to an output.txt file, but the help message isn't being redirected as expected. I've tried several different solutions, but none ...
Afff's user avatar
  • 1
0 votes
0 answers
53 views

Syncing all Resource Room calendars to all Users Outlook at once

I have 200+ Office 365 users. I would like to force all the room calendars into their accounts. They have permission already to view and add meetings, but I would have to manually add Calendar>From ...
user23458504's user avatar
1 vote
1 answer
71 views

How to run the powershell script simultaneously on multiple computers

I am trying to run the PowerShell script, which I have, on multiple computers simultaneously. Currently, I'm using PowerShell version 5. I want to know is it possible to run it without background ...
mohan 's user avatar
  • 21
0 votes
2 answers
175 views

How to create and run the windows service using powershell script

I'm trying to create a new service (AppOneTest) on windows 2016, which should be available in services.msc and whenever the service starts (AppOneTest) it should start the process explorer $...
mohan 's user avatar
  • 21
1 vote
1 answer
130 views

Windows PowerShell: Get-FileHash and long file paths

OS is Windows 10. I'm using PowerShell's "Get-FileHash" command to generate a file's MD5 checksum directly within its folder, like so: PS Z:\Test> Get-FileHash 'test.txt' -algorithm MD5 ...
user1763606's user avatar
0 votes
0 answers
45 views

Importing modules into a remote PC with powershell

I can't find an answer to this issue which I can understand so forgive me if this has already been answered. I'm trying to use self-written modules on a remote PC using Powershell. I would like to use ...
Dermot Bohan's user avatar
1 vote
0 answers
22 views

Why can the tree view of MC have a folder as root in the version for PowerShell but not the version for Bash?

MC (Midnight Commander) has versions for both Linux Bash and Windows PowerShell. It has tree view but the feature seems different. In order to open a tree view with a folder as root of the tree on the ...
Dan D.'s user avatar
  • 701
-1 votes
1 answer
32 views

set configuration of docker-desktop programaticaly

I'm here again, let's see if you can give me a hand... Normally when you install docker-desktop from 0, some configuration files are set to: C:\Users\AppData\Roaming\Docker\setting.json It is almost ...
Francisco Nuñez IA Lover's user avatar
0 votes
3 answers
24 views

PowerShell - Number in non-sequential range check failing

I have a list of digits, some sequential, some with breaks. Here is an example. (1..10),12,15,(30..45),50,53 When I try and query whether "my number" is in this list – let's say it's 4 – all ...
seagull's user avatar
  • 5,516
0 votes
0 answers
20 views

Can't start powershell.exe or use the server manager

Windows Server Datacenter 2022 used as Remote Desktop Server. Powershell closes immediately after starting. I can start the Server Manager, but I get the same error. If I want to add or remove ...
user avatar
1 vote
0 answers
23 views

UltraVNC 1.4.3.6 - Can't find argument when launching from a script that will span over multiple monitors

When running UltraVNC 1.4.3.6, I can span display over multiple monitors when launching the vncviewer.exe and selecting span over multiple monitors checkbox. However, when launching this from a ...
Ron's user avatar
  • 11
0 votes
1 answer
89 views

How to add a numerical password in BitLocker? [closed]

I want have on PC add a numerical password. What should I do? Because how much I searching for information can't find any specific. Any advice? Because in other device: Volume C: [Windows ] [OS Volume]...
Darbas Darbas's user avatar
2 votes
1 answer
72 views

New-ADUser -Manager from different domain

My Powershell script to create new users does not work when the "Manager" is located in a different domain. For example, I am creating a user in the domain contoso.com, but the manager is ...
Panki's user avatar
  • 182
1 vote
0 answers
26 views

Win32_EncryptableVolume and Bitlocker

I am playing around trying to learn the Win32_EncryptableVolume class functionality (https://learn.microsoft.com/en-us/windows/win32/secprov/win32-encryptablevolume). I have created a VM for the ...
user2334659's user avatar
0 votes
0 answers
29 views

How to install the certificate used to sign an executable using PowerShell?

This question is a follow up to Programmatically getting an executable's Certificate Details. I want to know how I can install the certificate to the cert store used to sign the executable using ...
yasouser's user avatar
  • 313
0 votes
1 answer
33 views

Installation of Drivers Via Programming Language

I have a Driver called X that manages a hardware component A. I would like to remove that drive and replace it with one called Y that also manages the component A. So far I have been using .NET ...
EnlightenedFunky's user avatar
1 vote
1 answer
92 views

Disk 0 doesn't show when using PowerShell Get-Disk

On one machine I'm using, the PowerShell cmdlet Get-Disk doesn't show Disk 0. But using other commands it will... Get-Disk | Select Number, FriendlyName, HealthStatus, Size Number FriendlyName ...
Dennis's user avatar
  • 151
0 votes
1 answer
16 views

cannot set a variable within a wmic useraccount request

Folks, I'm trying to set some attributes for a large set of user accounts on a W10 system. To do so, I create a table of usernames with get-localgoupmember, which I parse with a foreach command. Let's ...
viklander's user avatar
0 votes
1 answer
74 views

PowerShell, Windows 10 autologon inside a Hyper-V VM [duplicate]

I have a pristine Windows 10 VM inside a newly installed Hyper-V on a newly setup Windows 10 host, and have been trying to get the VM to autologon using PowerShell. I've spent quite a few hours on ...
YorSubs's user avatar
  • 823
-2 votes
0 answers
28 views

Periodically download a file from web in Windows 11

Is there a way to periodically download a mp3 file from the web in windows 11. I have tried to use the method suggested for windows 7, but powershell just throws up errors: PS C:\WINDOWS\system32> ...
Phoenix Radio's user avatar
2 votes
1 answer
58 views

What is the currently the preferred location of PowerShell profiles?

I've come across this (archived) Blog post on PowerShell profiles. In the learning docs I read a note that the scripts should not be stored on OneDrive. Users probably will use the standard settings ...
theking2's user avatar
  • 398
0 votes
1 answer
25 views

scheduled task only running when ran manually besides it's automated

So... I have an automated Windows Task Scheduler Task rolled out via a GPO. That task is running the powershell which receives a script to run via the -File Parameter (file path on our storage server) ...
user avatar
0 votes
1 answer
119 views

How to pass arguments from a windows 10 scheduled task to a powershell script onLock and onUnlock events/triggers

I am trying to setup the following scenario using a windows 10 task scheduler. A logged in user locks or unlocks the workstation A powershell script gets triggered and the PC-NAME and a USER_NAME of ...
CAIB-scay-lact's user avatar
1 vote
1 answer
58 views

Logging files that are unable to transfer in powershell

I'm trying to log some files that are unable to transfer when I'm recursively copying over one folder to a different location. When I right click, copy, and paste the folder, I get an error message &...
foldersupreme's user avatar
-1 votes
1 answer
42 views

how to get back the file that has been downloaded using Invoke-Webrequest without providing the output switch?

I downloaded a large file, using wget which is just alias for Invoke-WebRequest commandlet in powershell, and it asked me url i provided, it completed, and gave me the Headers of HTTP request instead ...
Yanjan. Kaf.'s user avatar
0 votes
1 answer
54 views

Linux/Ubuntu/Orange Pi5 retrieve open tabs on Chromium (kiosk mode) via terminal - Powershell

I have a problem as of late where I am developing some PowerShell script to manage and update some digital displays. Please see below for my work in progress (By no means done). I am struggling to be ...
M.Atkinson's user avatar
0 votes
0 answers
109 views

Windows 11 iso file fails to mount

I downloaded the latest windows 11 ISO from Microsoft. I verified that: the SHA256 checksum matches the ISO is unblocked The ISO is not sparse. Trying to mount through Windows Explorer results in ...
Nicolas Holthaus's user avatar
3 votes
2 answers
208 views

Hyper-V Cmdlet for networking VMQ

When I run this: Set-VMNetworkAdapter -VMName $vmName -Name "Network Adapter" -VMQ I get this: Set-VMNetworkAdapter : Missing an argument for parameter 'VmqWeight'. Specify a parameter of ...
YorSubs's user avatar
  • 823
0 votes
0 answers
31 views

Hyper-V sluggish when running PowerShell scripts

I am running fully patched Windows 10 and have 64 GB RAM and a new AMD Ryzen 5 7600 6-Core CPU. Performance on the host is great. I've setup Hyper-V and creating VM's is fast and snappy. I have ...
YorSubs's user avatar
  • 823
2 votes
1 answer
61 views

Running multiple commands in WSL2 / Ubuntu 22.04 from PowerShell

I have to run a chain of commands in wsl from powershell, I've stumbled upon this question while researching, but I cant use && with wsl (wsl "ls && ls" returns with bash: ...
DeNice's user avatar
  • 23
0 votes
1 answer
67 views

How to Access and Inspect `edge://translate-internals` via CMD-Batch or PowerShell?

I've encountered a specific issue with the Microsoft Edge browser, particularly related to its translation feature. Similar to the situation described in this Reddit post, I am trying to find a way to ...
Foad's user avatar
  • 616
3 votes
1 answer
69 views

PowerShell: How to Batch Rename Using Split

I'm new to PowerShell to try and Batch Rename files. I'm deleting unique fields from the file which I managed to Using Split. I can't figure out how to Rename them. This is how I got the file names to ...
KoKee's user avatar
  • 33
0 votes
1 answer
45 views

Errors while reading policies from this GPO, not all policies are displayed

I am working on implementing an automatic Quality of Service (QoS) policy creator using the "New-NetQosPolicy" PowerShell command. I have a C++ script that executes this command to limit the ...
Powplowdevs's user avatar

1
2 3 4 5
116