Questions tagged [powershell]

Relates to Microsoft PowerShell for Ubuntu.

Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

Post installation of PowerShell - PWSH command not found

I have just installed PowerShell on my Ubuntu server (18.04) using the command dotnet tool install --global PowerShell. After completing the installation sequence I was presented with You can invoke ...
1
vote
1answer
269 views

PowerShell not working in Ubuntu 19.10

I use Ubuntu version: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 19.10 Release: 19.10 Codename: eoan PowerShell Version: latest/stable 6.2.3, source: snap store;...
1
vote
1answer
36 views

Change characters to lowercase

I am trying to make all values in the 11th column of my .csv file lowercase. I know I can use 'tr A-Z a-z' but how do I make sure it is working in the file I want and only on the 11th column.
0
votes
1answer
34 views

Accessing MySQL from Powershell on Ubuntu 18

I'm trying to access MySQL via PowerShell running on Ubuntu 18 and having some trouble loading the Assembly. Below is the code as it runs on Windows. [void][System.Reflection.Assembly]::...
-1
votes
2answers
1k views

Copying first 100 files from multiple folders to one folder (or deleting the rest)

I've got the following issue. I've got a folder, within this folder there are about 100 different folders, within each of these folders there are about 500 files. I want to only keep the first 100 ...
1
vote
1answer
395 views

Set Powershell as login shell in Ubuntu 19.04

In Ubuntu 19.04 sudo apt install powershell fails with The following packages have unmet dependencies: powershell : Depends: libssl1.0.0 but it is not installable Depends: libicu60 but ...
-1
votes
2answers
218 views

Convert String to time using shell

I have shell script which will bring time (h:m:s)from database and compare that time with the current time to make an action depending on the result of comparing . I get current time using this ...
0
votes
0answers
101 views

how to execute a powershell script using snap?

How do I run this powershell script? thufir@dur:~/powershell$ thufir@dur:~/powershell$ ./hello.ps1 bash: ./hello.ps1: /usr/bin/pwsh: bad interpreter: No such file or directory thufir@dur:~/...
3
votes
1answer
612 views

How to make PowerShell Core remoting work?

I have Kubuntu 18.04 installed on my machine and I installed PowerShell Core following the instructions given: Installing PowerShell core in linux. I then setup the remoting following the steps ...
1
vote
0answers
283 views

Exporting environment variable not working from shell script

I have ubuntu image in docker, I'm trying to setup nodejs, phantomjs, npm etc.. and for PhantomJS I need to export QT_QPA_PLATFORM variable and set it's value to offscreen. The problem is that when ...
1
vote
0answers
793 views

Get-LocalUser in powershell fails with “The term 'Get-LocalUser' is not recognized”

I have installed both powershell binary and app image and get the same error in both. PSVersion: PSVersion 6.1.0-preview.1 PSEdition Core ...
0
votes
1answer
192 views

Setting up the AWS Tools for PowerShell Core on Linux

The AWS utility has this to say about privileges: Note Although you can start PowerShell by running sudo pwsh to run PowerShell with elevated rights, be aware that this is a potential ...
2
votes
0answers
234 views

Powershell constantly creates folder in /tmp

System: Ubuntu Server 14.04.1 uname -a Linux [...] 4.4.0-116-generic #140~14.04.1-Ubuntu SMP Fri Feb 16 09:25:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Involved Software: nagios (core Version 3.5.1)...
-2
votes
1answer
2k views

execute a powershell script (hello world)

A powershell "hello world" script is spawning and bogging down the system: Tasks: 413 total, 2 running, 411 sleeping, 0 stopped, 0 zombie %Cpu(s): 42.8 us, 5.9 sy, 0.0 ni, 51.2 id, 0.2 wa, ...
-1
votes
1answer
675 views

How to install powershell on Artful Aardvark 17.10?

Because of this bug it's not possible to install powershell from apt for newer Ubuntu versions? $ cat /etc/apt/sources.list.d/microsoft.list deb [arch=amd64] https://packages.microsoft.com/ubuntu/14....
1
vote
1answer
967 views

Changing the terminal font colors while running linux(ubuntu) in Windows PowerShell?

I'm running ubuntu through the Windows PowerShell. The path is in a blue color which is very difficult to read. How can the colors of the fonts, backgrounds, foregrounds be changed?
3
votes
1answer
481 views

How to install software to another partition?

I dont have enough free space on my ubuntu partition(200MB free space to be precise) and but I want to install Android studio and powershell. I have 7-8GB free space on my other three partitions.How ...
11
votes
4answers
9k views

Install Powershell in Ubuntu 17.04

I'm trying to install Powershell in Ubuntu 17.04 as the following these steps: curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - curl https://packages.microsoft.com/config/...
1
vote
0answers
403 views

PowerShell launcher

I am setting up a demo Ubuntu 16.04 devbox and I wanted to create a launcher entry for PowerShell that uses the default gnome-terminal but with the canonical PowerShell colors and icon on the launcher....
17
votes
4answers
6k views

How do I install PowerShell?

Not long ago I read something on Microsoft's website about PowerShell being available for Ubuntu. How would I go about the install of PowerShell? I'd appreciate guidance for both Xenial & ...
4
votes
3answers
13k views

Can I run PowerShell on Ubuntu? [duplicate]

I have been assigned a project to be done in Windows PowerShell. I am familiar with shell scripting but it's a new technology. I was told that its similar to shell except few syntax changes. I have ...