All Questions
Tagged with powershell batch-file
2,459
questions
0
votes
0
answers
56
views
Powershell - Invoke bat script and automatically type text at input prompts
I'm using EasyRSA-Start.bat OpenVPN script for generating clients.
In cmd, after run, I have to type a command, after that I'm prompted to pass the verb, and I would next have to type exit to quit.
I ...
0
votes
0
answers
26
views
how to run batch file on Mac [migrated]
I've been attempting to install a mod for Elden Ring on Mac, and it uses a batch file to install and launch. I can't seem to get it to run with wine, receiving these errors:
0074:err:ntoskrnl:...
-1
votes
0
answers
81
views
Why am I getting this error in Task Scheduler?
Goal of the program: Run (.bat) file that disconnects Tailscale when the computer is idle for over 1 minute.
Here's what I already have set up:
A (.bat) file that disconnects tailscale.
@echo off
&...
3
votes
1
answer
104
views
PowerShell wont work as admin with double quotes
The problem is that the '-Verb RunAs' wont work with '\"' for some reason
and I need the quotes for better handeling of paths
:: Check for admin privilage
openfiles > nul 2>&1
if !...
0
votes
0
answers
69
views
Batch Script: Replacing Entire Line in Text File Without Deleting Rest of the File [duplicate]
I’m currently working on a batch script where I need to find a specific string within a text file and replace the entire line where that string is found. The specific string is part of a larger string ...
0
votes
1
answer
89
views
Unable to handle error from external batch command
I used to have a local project batch file that called IZPACK's compile.bat in an Azure Devops pipeline. There was an error with the build that didn't fail the pipeline so I added the check to fail on ...
0
votes
2
answers
79
views
Get a specific text from a text file output with a value in a column format
I'm trying to get a value from an output sample below using a custom app that I ran on PowerShell/CMD.
The format of the output looks like this:
Upload Hello.zip: 933 of 933 bytes complete
Id ...
1
vote
2
answers
126
views
Run Powershell with parameters from batch file
For convenience of use, I need to put my powershell script in a bat file. The bat file content is as follows:
# 2>NUL & @CLS & PUSHD "%~dp0" & powershell -COMMAND "Start-...
0
votes
1
answer
60
views
Powershell replace a string with percentages and quotations
I am struggling to get this powershell replace (command in a batch) text to work;
@echo off
pushd %~dp0
setlocal EnableDelayedExpansion
::enable PS commands in batch
set "Ps_Bypass=PowerShell....
-1
votes
3
answers
71
views
How to replace a specific word in XML file with batch file [closed]
I want to change the value 8888 of $SERVER_PORT in below XML file.
server.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software ...
1
vote
1
answer
53
views
How to hide the installing package message from the executed powershell command in the .bat script?
How to hide the blue pop-up notification "installing package AudioDeviceCmdlets" and "Downloaded" messages from the executed powershell command in the cmd window?
I see this when ...
-1
votes
0
answers
74
views
How do I get a Windows batch file to work under Powershell and normal cmd.exe?
I have a batch that performs normal operations. One line of this script runs a Powershell-specific command like this:
powershell -Command "& {Get-FileHash myfile.fwpkg -Algorithm MD5}"
...
0
votes
1
answer
70
views
CMD executes powershell command to continuously log (tail) a file but does not return back to cmd or execute next command
I am using CMD to execute PowerShell command for logging (tailing a data file "trun.out" that updates from a simulation run). > See the "Call start Poweshell" portion of the ...
1
vote
1
answer
120
views
Powershell toggle bluetooth with a click
I made up my research and I got this on another question here.
I'm using this powershell command to toggle Bluetooth:
Bluetooth.ps1
[CmdletBinding()] Param (
[Parameter(Mandatory=$true)][...
1
vote
0
answers
27
views
Batch Script-Powershell MessageBox | How do I set TopMost within PS command line of Batch? [duplicate]
I created a single file to run a set of backup commands for a proprietary software that needs to run in Windows Vista thru Windows 10.
However, I am having an issue where the PS MessageBox keeps ...