Skip to main content

Questions tagged [powershell]

Tag to be used for questions about Microsoft Powershell. For general shell questions, use the [shell] tag. For other shells, use their own tags like [bash] and [zsh]. For questions about scripting, the tag [scripting] should be used along with the shell tag.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
295 views

The official docs doesn't have a section for CachyOS or Arch Linux. I tried following some guides online to build it myself, to install AUR, snap, pacman, and I don't know what other methods, but none ...
Delphi Programming's user avatar
0 votes
2 answers
217 views

I'd like to develop some short scripts for Windows users, but my computer is running Debian 12. I'm aware that I can tell the Windows users to install Powershell 7 or another scripting language which ...
Dan Getz's user avatar
  • 1,539
0 votes
0 answers
127 views

I read through some other threads of similar issues but none of the solutions worked (haven't tried overwriting the public key as I don't know if that will lock me out or cause other issues, if this ...
browb7's user avatar
  • 1
0 votes
3 answers
3k views

I want to log into a Ubuntu server from my Windows machine. When I use PowerShell, permission is denied. PS C:\Users\sebastian> ssh [email protected] [email protected]'s password: Permission ...
Sebastian's user avatar
0 votes
1 answer
120 views

I host numerous RHEL 8 servers in the Azure environment. I am using a Red Hat Satellite VM to patch servers and then I rely on the owners to reboot once patching is complete. I want to implement a ...
Jared's user avatar
  • 9
0 votes
1 answer
162 views

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
1 answer
306 views

I can do this to directly enter a PowerShell ssh foobar 'powershell' , but in this shell, arrow keys won't work. It works if I just: ssh foobar ..and then enter PowerShell, by typing powershell. ...
Jason Hunter's user avatar
0 votes
1 answer
99 views

I created a GCP instance, and I created a private and public key on kali linux, I saved this key in the metadata of GCP, so I can access the instance through my kali machine. Then, I need to copy a ...
Christian Ramírez's user avatar
2 votes
2 answers
6k views

I've been using yt-dlp to download audio files before running mpv for playing them back. I've been specifically using the following commands: yt-dlp -f ba "ytsearch:major artist cool music" ...
Gabe Devs's user avatar
0 votes
1 answer
1k views

It is extremely likely this question comes from a major misunderstanding, but I will explain what I am trying to do/have done. I am also not fully sure this is a Linux/Unix issue. My goal is to view a ...
lingStudent's user avatar
3 votes
1 answer
506 views

I'm currently running Gentoo Linux and have installed PowerShell (app-shells/pwsh-bin) as I am a contrarian. That being said, I am unable to obtain colour by default when running certain commands. ...
JJ Marr's user avatar
  • 33
2 votes
2 answers
450 views

On Stack Overflow a comment to Can PowerShell Core handle ps1 files with CRLF line endings in Linux environments? asserted that executable files that use a shebang must use only the LF line ending, ...
Garret Wilson's user avatar
0 votes
1 answer
667 views

So I'm working on a powershell script that runs a pester test. The script connects to a Kubernetes pod with a Mongo database. The goal is to check whether or not a collection in the database is empty. ...
a_wahab's user avatar
0 votes
1 answer
215 views

For example I have 190 files and I want to add L001 in the middle. How can I do that using cmd command, or PowerShell if it is better? Also some numbers are 2 digits some are 1. PP-SD01_S1_R1.fastq.gz ...
Ittipon Shu's user avatar
0 votes
1 answer
4k views

In powershell I'm used to doing something like this: > $python_files = get-childitem *.py > echo $python_files[0] The second command allows me to extract the first file, since get-childitem ...
user32882's user avatar
  • 101
1 vote
1 answer
4k views

Using the DPI class script referenced here I can get DPI scaling for my main monitor how would I also get the output from any additional monitors which may have a separate scaling factor?
MANICX100's user avatar
  • 229
0 votes
2 answers
949 views

When I run a specific program with choices Do this Do that Do something else And eventual sub-choices Enter website: Enter credentials: I want to do the following echo {choice} | echo {choice2} | ...
Leonardo van de Weteringh's user avatar
-1 votes
1 answer
1k views

This is a follow up question from this question that got contributed by another person. I have following output from a webserver: { "status":"OK", "result":{ ...
Alicia's user avatar
  • 1
0 votes
0 answers
148 views

It seems to me that the license surrounding Powershell would prevent a Live CD coming with Powershell; but I'm not a laywer. But it also seems to me that it would be somewhat useful for purposes of ...
leeand00's user avatar
  • 4,971
0 votes
1 answer
153 views

I have a small script that checks if my rsync backup has completed and if so sleeps my machine. This is on WSL (Debian). #!/bin/bash # if rsync is running, then wait 5 while ps aux | grep -q -e "...
NoExpert's user avatar
  • 499
0 votes
0 answers
165 views

The call instaloader --post-filter="likes > 16720 and not is_video and date_utc >= datetime(2021, 5, 29)" --no-profile-pic --no-videos --count=12 cristiano works fine. But put the ...
ishandutta2007's user avatar
-1 votes
1 answer
294 views

On Asterisk boot/reboot I want a PowerShell file to be executed. I have created a .ps1 file on /var/spool/ which is supposed to copy new files from an asterisk directory and transfer them to an Azure ...
admiri's user avatar
  • 101
0 votes
1 answer
425 views

My scenario is I have a file that has the contents looking like this but longer. https://pastebin.com/q33wFdAX I need to remove each occurrence of <category>Games</category> </...
volitank's user avatar
-4 votes
2 answers
382 views

I have a requirements where I need to print a webpage in PDF format. Created one dashboard and shared it using permalink(a permanent static hyperlink to a particular web page). I need to print this ...
amit10504's user avatar
3 votes
0 answers
249 views

I am stuck with the following problem: we have an app that runs an continuous loop opening remote connection via powershell (performing some actions and then closing). This works fine in a Windows ...
Veverke's user avatar
  • 378
4 votes
3 answers
5k views

Shell scripts are better when having a shebang like so: #!/bin/bash echo "The shebang above this line works like a typical a comment but with a purpose" PowerShell scripts are also shell ...
Abel Melquiades Callejo's user avatar
1 vote
0 answers
260 views

I'm on Fedora 33 + Gnome. Open gnome-terminal in a folder (let's say, the Downloads), open another terminal tab/window and type pwsh: if you check the value of $profile it refers to a temporary ...
user3534974's user avatar
0 votes
1 answer
1k views

I have gone very old school but it's is great fun. vim is great at editing without GUI so connecting to a remote data collecting PI it gives a very simple stack to maintain code and settings. It works ...
ken205726's user avatar
0 votes
2 answers
585 views

I have a script I run from Windows Powershell and it can update a files modified, and last accessed timestamps. I run the script from a Windows 7 laptop but it can update file timestamps that reside ...
FlexMcMurphy's user avatar
1 vote
1 answer
2k views

I'm trying to insert records into a column in Oracle where the values are passed from a shell variable. The variable itself stores pattern generated from a list of files. This pattern is generated on ...
AntiNational's user avatar
1 vote
0 answers
1k views

I want to install WSL 1 in my Win 10 OS, and have followed the instructions at https://docs.microsoft.com/en-us/windows/wsl/install-win10 from PowerShell as Admin: dism.exe ... - no problem ...
Colin Rowat's user avatar
1 vote
1 answer
2k views

I'm trying to run a gRPC service on Linux while running a client on Windows. I seem to be unable to test the Linux port that I use from my Windows machine. Both machines are in the same network. ...
tube-builder's user avatar
1 vote
1 answer
31 views

I want create one template template from one modele with power cli. I have esxi 6.5 and vcsa 6.7 Plese can you help me
Arthur Gorbana's user avatar
1 vote
0 answers
1k views

In looking at powershell, the general assumption is that it's being used either for or on Windows machines in a homogeneous network. Strictly within Linux, and only using "core" powershell, looking ...
Thufir's user avatar
  • 1,970
0 votes
1 answer
1k views

I have a piece of code which generates a output as chunk. TIBCO ActiveMatrix BusinessWorks version 6.4.2, hotfix 7, build V103, 2018-07-18 Connecting to the BW Agent using TIBCO ActiveSpaces (Java). ...
johny's user avatar
  • 1
1 vote
1 answer
2k views

Is it not possible to install Get-Disk on Linux? PS /home/thufir/powershell> PS /home/thufir/powershell> Get-Module -ListAvailable Directory: /home/thufir/.local/share/powershell/Modules ...
Thufir's user avatar
  • 1,970
1 vote
0 answers
521 views

Is there a way to install PowerShell on TinyCore? The below link is the MS documentation for supported Linux distros. https://docs.microsoft.com/en-us/powershell/scripting/install/installing-...
Ayan Mullick's user avatar
8 votes
2 answers
2k views

I am having some issues installing PowerShell on my 32-bit Kali Linux PC.  I followed this guide and started with: apt update && apt -y install curl gnupg apt-transport-https Next, I ...
WeAreOne's user avatar
  • 229
0 votes
2 answers
1k views

So far on Windows 10 I used mainly the PuTTy bundle (PuTTygen, Pageant and PuTTy, etc) to SSH into remote Linux machines. I use Pageant as a private key holder to hold to private key (and possible ...
user avatar
1 vote
1 answer
74 views

I'm trying to save on linux powershell core 6.1 information about the volumes in a variable. Best in the same or similar format as it is possible on windows. But i am unable to achiev this kind of ...
Donut's user avatar
  • 11
2 votes
1 answer
1k views

I was curious as to whether or not there is an equivalent to PowerShell's "Switch" command that lets you maneuver with input instead of using a multitude of "if-statements"
Paco R.'s user avatar
  • 21
8 votes
3 answers
8k views

Why is Resolve-DnsName not recognized for PowerShell Core? So far as I recall it works fine with PowerShell itself. Is this a .NET versus dotnet problem? That dotnet simply doesn't have this ...
Thufir's user avatar
  • 1,970
12 votes
1 answer
16k views

So I am currently using the wget command on windows 10 powershell to download various files. However, when testing this command, files do not actually download. For example, say I want to download an ...
Tahoe155's user avatar
  • 133
2 votes
2 answers
3k views

I have just installed the open-source version of PowerShell for Linux on Arch Linux using the powershell-git package from AUR. When I try PowerShell's -Version functionality, I get the following: PS /...
ThePiercingPrince's user avatar
25 votes
8 answers
15k views

I've always found it awkward when complex shell commands involve parsing text output with AWK. Basically we're converting structured data into text, then parsing the text again to get back at the ...
Wim Coenen's user avatar
  • 1,273