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
0
votes
1answer
10 views

FireFox Page Info

Looking to download the URL's for the Images under the Fire Fox Media Tab under the View Page Info preferably using power shell. Not sure if this is possible or if there is a better way to do this.
0
votes
1answer
16 views

Windows terminal: How to use context menu?

Some users often imply CMD or PowerShell when they talk about Windows terminal. But I have question about the thing that is literally called Windows terminal. With PowerShell I can open context menu (...
0
votes
0answers
20 views

Command to make powershell console window hidden not working

I have a script that needs to run as administrator and hidden on my computer. I am able to initially call it as a hidden process but if the script fails or the code changes I will call it again: ...
-1
votes
0answers
9 views

Run multiple application instances from commandline with ascending parameter [closed]

I have an application that is run like MyApp.exe port 12345. I want to run up multiple instances with incrementing port values from some specified value. e.g. RunApps 12345 5 would do: MyApp.exe ...
0
votes
0answers
21 views

Powershell won't send notification if shell script called from a powershell script

I was following the tip here to send notification in Desktop, it works if I send the command `toast from the powershell terminal itself. However if I send it from bash script, no notification is ...
0
votes
0answers
5 views

Is there a way to mount a folder from a host specified in $HOME\.ssh\config and using pubkey auth?

Does Windows (10; either through PowerShell or somehow via WSL[2]) have a way whereby a folder sitting on a host specified in $HOME\.ssh\config, and using Public Key Authentication, can be mounted in ...
0
votes
1answer
39 views

Powershell GUI - not calling sub batch file

Regarding my Powershell script with GUI: When compiled as a .exe (PS2GUI with noConsole) it works properly, but when calling this same .exe from a .bat, it does not work: It does not start the Start-...
1
vote
1answer
49 views

Identify package name of an appx file

Is there an easier way than unzipping the appx file and inspecting files for the given scenario to obtain the full package name of an appx file? I install a specific appx file on a machine with Add-...
0
votes
0answers
19 views

Disable IPv6 using CMD or Powershell on Windows 7

I'm trying to disable IPv6 connectivity on Windows using either command line or WMI api without restarting the computer (I know about adding an entry into Windows registry, but this requires rebooting ...
1
vote
0answers
49 views

Mirror a folder and extract all zip files in their respective subfolders using powershell

I need to maintain a mirror of a unix server folder on a Windows Server for which I am using WinSCP and the following code: option batch abort option confirm off open sftp://Americas\service-abbvie:...
0
votes
2answers
77 views

Is there an equivalent “sudo” command in PowerShell on Ubuntu?

I would like to try and use PowerShell as my default shell on Ubuntu 18.04, however with bash I can opt to run some commands as sudo and I'm not sure how I'd be able to do that with PowerShell as it ...
0
votes
1answer
21 views

How do I get Update-Help to download the help documentation for PowerShell on Ubuntu 18.04?

I installed PowerShell on Ubuntu 18.04.2 running in WSL 2. I would like to use PowerShell as my default shell. I noticed that when I try use Get-Help on any topic it says help documents were not found ...
0
votes
0answers
14 views

How to use files names on command line copied in File Explorer? [duplicate]

In Windows File Explorer, you can highlight several files and then click the "Copy path" button from the menu. Show below is an example. I'd then like to process these files on the command line, ...
0
votes
1answer
73 views

Make windows always on top (win10) [closed]

I know there are plenty of answers both in internet in general and in this site but none of them works for me because all involve installing some kind of software. I would like a solution to make ...
0
votes
1answer
36 views

Powershell Skip Folder using Get-ChildItem

Part of a PowerShell script I am running, I want it to completely ignore a specific folder or path. I've tried to use the -notmatch and also -notlike operator. But it seems it will still go through ...
0
votes
2answers
33 views

how i can duplicate lines between two txt files

i have two files first.txt contains : 1 2 3 4 6 Second.txt contains : 1 4 2 how i can delete all lines in first.txt that contains second.txt lines and save them to third file Note: second.txt ...
0
votes
0answers
60 views

Notice When Window Being Created of Other Thread or Process using Powershell

Is there a way to get a notice when there is a window which has just been load and going to be created (e.g. after clicking a button) within other thread or process? I want to use it in Automation for ...
2
votes
1answer
25 views

powershell task in task scheduler cannot start-process with another -Credential

We have a scheduled task that is a powershell script. The script performs a number of actions against SQL data-bases where the access is controlled via integrated security. Hence each of these ...
1
vote
0answers
42 views

Why do screenshots appear black when playing games

I was just curious to know why normal print screen methods (PowerShell methods, PrintScrn button etc.) just show up black screen when playing fullscreen video games, couldn't find anything to answer ...
1
vote
0answers
12 views

Powershell Check Scheduled Task Status

I've got a PS1 script that is automatically run by Windows Task Scheduler and checks the status of a different scheduled task on the same machine. If ((Get-ScheduledTask -CimSession Sever1 -TaskName ...
0
votes
0answers
26 views

.Net Framework 3.5 replaced by .Net environment in Windows Features

By a recent windows update in Windows feature Net Framework 3.5 got replaced by .Net environment. Now I am not able to start applications like powershell, docker desktop etc. which relies on .NET. ...
1
vote
1answer
30 views

Powershell 7 / core in MobaXterm

Is it possible to add a new (saved) session to MobaXterm for Powershell 7 / future versions of Powershell Core? Currently the only option when adding a new shell session is "Powershell", which adds a ...
0
votes
0answers
20 views

use network credentials in Veeam script

i am trying to secure my backups against ransomware ( using different non domain passwords on the shares) , i use the below script with Veeam Backup & replication community version the script ...
0
votes
0answers
36 views

Why is it not possible to start powershell elevated and as another user?

Is there a reason why this command: Start-Process PowerShell -Verb RunAs -Credential (Get-Credential) is not supported? You cannot pair -Verb and -Credential. So basically you can not start ...
0
votes
0answers
21 views

UI Automation Events on Powershell

I'm trying to listen UIAutomation events using Powershell, and wrote somethings like this. $propChangeHandler= [System.Windows.Automation.AutomationPropertyChangedEventHandler] # <summary> # ...
0
votes
1answer
38 views

PowerShell: Get-Package to output the full name

When I'm using Get-Package I get this list. Name Version Source ProviderName ...
1
vote
1answer
30 views

Batch file with Powershell command quotes

I have created a script to change my IP address/mask and VLAN ID of an interface but the problem is that in order to change the VLAN ID, I need to execute a PowerShell command. My variable containing ...
0
votes
0answers
28 views

How to interact with windows (raise/lower) of already open applications from command.com or powershell

I have a series of open windows showing in my taskbar that I want to raise/lower via scripts (e.g. half a dozen web pages pre-opened for reference). I specifically don't want mouse interactions or ...
2
votes
2answers
110 views

Delete every subfolder in a directory that doesn't contain certain extensions

Question: Is it possible to delete every folder in a certain directory that does not contain specific file types for example music files (mp3/flac/wav/etc)? I've retagged some files using Mp3Tag ...
0
votes
0answers
23 views

Using powershell or cmd to CONNECT/DISCONNET webcam [closed]

I need to create a command line script to manage my webcam. I use Fn key combination to connect/disconnect it. Which it is not the same as enable/disable it. I can enable/disable using Enable/Disable-...
0
votes
1answer
26 views

PowerShell commands not available over SSH

I am using OpenSSH to connect from a Windows 10 machine to another Windows 10 machine. Why on the target machine I am not able to execute PowerShell commands, but only commands that are available in ...
0
votes
0answers
25 views

Send email from G-Suite account using PowerShell, without 2FA

I used to send an email once per month, from a PS1 script using SMTP from my G-Suite account. Since a few months, Google doesn't accept emails sent from the script and sends me a warning email that ...
2
votes
3answers
145 views

Delete files depending on positions/file name in the current folder / define multiple values effectively

How do I effectively delete several files depending on their positions(edit: or retrieve the files by their number) in the current folder? Preferably I need a solution with a normal .bat file. The ...
0
votes
1answer
58 views

Batch rename files to grandparent directory name

Directory structure looks like this: D:\folder0\subdir1\scan0001.tif D:\folder0\subdir2\scan0001.tif D:\folder0\subdir3\scan0001.tif D:\folder0\subdir1\RAW\raw0001.tif D:\folder0\subdir2\RAW\raw0001....
1
vote
1answer
415 views

Powershell Monitor Clipboard Change

I'm trying monitor clipboard change by powershell, and not consider to use comparing (Get-Clipboard) before and after change because it cannot distinguish between "two copy are identical" and "haven't ...
2
votes
1answer
32 views

Start explorer from powershell after completely killing it with taskkill

I made a script to run an old game which has grafic problems when explorer.exe is running. This script kills explorer.exe with taskkill /F /IM explorer.exe and this works fine. But when I run start ...
0
votes
1answer
44 views

Windows10 Shutdown Sound Playing Properly

I have set up a scheduled task to restore the shutdown sound Windows 10 (Pro) is missing by default. I set up that event 1074 triggers powershell.exe playing the sound with this argument: -c (New-...
-1
votes
0answers
27 views

Automate installation of plugin for Jubula software

How can i install plugin for jubula ite with command line? To install it manuel is same as Eclipse and with command line one can install plugin for Eclipse but i need to automate installation of ...
-2
votes
0answers
11 views

PowerShell script: Search folders for PDF based on User Input, Out-File to view PDF

I'm new to PowerShell so I need help!   I'm trying to build a script to search two different folders with large amounts of PDF files contained in them. I need to be able to search both folders for ...
2
votes
1answer
50 views

Internet Connection Sharing + Port Forwarding range

I'm using Internet Connection Sharing from a Windows 10 computer in order to give a device internet connection and would like to use port forwarding from this connection as well but I need to add a ...
0
votes
1answer
26 views

PowerShell Tee-Object also verbose logging

I use Tee-Object to output my command to console and a file. I use this command: Command 2>&1 | Tee-Object 'myfile.log' With this command I only get standard and error output in my file. When ...
1
vote
1answer
24 views

Storage Spaces isn't moving my data to SSD

I have a very basic storage setup in my workstation PC. At the moment 1 SSD + 1 HDD set up in a tiered Storage Space. I'm on Windows 10 Pro so I've been doing this all via Powershell manually. I was ...
0
votes
0answers
11 views

Unable to access rclone mount in Powershell

I've mounted my server using SFTP (as F: drive) on Windows 10, but Powershell can't access the drive and as a result I must open all files via Windows Explorer which loads extremely slowly. When ...
2
votes
2answers
53 views

Windows 7 Powershell

I asked this same question on my original account that I no longer have access to. Yesterday when I turned on my computer a tab opened that is just a blue screen called C\WINDOWS\System32\...
0
votes
0answers
32 views

Powershell on Windows 7 [duplicate]

Should I be worried that whenever I start my computer a tab opens and on this tab it is a blue screen with a little white flashing line as if I were going to type something and it says at the top,"C:\...
0
votes
1answer
37 views

How to set Password must meet minimum requirements policy using command prompt

I need to set local password policy. I don't want to use gpedit.msc .I able to set all other policies using net accounts command but complexity requirements is not listing in net accounts. How can I ...
0
votes
0answers
11 views

Manipulate Afx OLE Control in External Window by Powershell

I have to perform automation by manipulating (including get and set text from) an accounting system using Powershell. The process has a window which contain a grid-like container (the one with blue ...
0
votes
0answers
28 views

I installed a virus and i can't turn my windows defender on [duplicate]

so i basically downloaded a virus a few weeks ago, i removed the virus sucessfully but it still let me windows defender on broken i tried to change it in services but it was disabled so i tried to ...
0
votes
1answer
48 views

Install-WindowsFeature : Containers - Error: The parameter is incorrect. Error: 0x80070057

I am trying to enable Containers feature in Windows Server 2016 but I am getting the following error: Install-WindowsFeature : The request to add or remove features on the specified server failed. ...
0
votes
0answers
29 views

Excel - extract multiple instances of text “CVE” from data dump where CVE appears multiple times

I am looking to use Excel to extract multiple instances of text "CVE" from data dump where CVE appears multiple times. This dump is in one csv where each cell could have 1-10 instances of CVE followed ...

1
2 3 4 5
76