powershell

Building an AMI using Packer with Python & Python modules (using pip) installed via powershell script

Building an AMI using Packer with Python & Python modules (using pip) installed via powershell script Question: Using Packer, I am trying to create a Windows AMI with Python + the cryptography module installed. Here is the installation command I’m using for Python: Invoke-Expression "python-3.6.8-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" Standalone that works fine. If I …

Total answers: 1

How to run .sh file from console

How to run .sh file from console Question: I would like to know why I can not run the .sh file via ./launch.sh please have a look at the below posted screen-shot image Asked By: LetsamrIt || Source Answers: You need to mark it as an executable program with chmod +x launch.sh, or alternatively execute …

Total answers: 3

Create powershell environment variables with makefile, and accessing them with python os.environ

Create powershell environment variables with makefile, and accessing them with python os.environ Question: With VSCode, I’m accessing to a python project that have a makefile like this: VARIABLES = VAR1="text1" VAR2="text2" VAR3="text3" .PHONY: run run: $(VARIABLES) poetry run python -m start.app I am on a windows machine, with "make" installed on powershell by chocholately. Launching …

Total answers: 1

Python argparse not working corrrectly with path in Windows

Python argparse not working corrrectly with path in Windows Question: The argparse library in python doesn’t work for the path, containing space, and ” (backslash) at the end. The parser in argparse parses the backslash at the end of path to " (double quotation). The code below is sample that has same problem. import argparse …

Total answers: 1

Extract a value from an array of data

Extract a value from an array of data Question: I get such an array of data [U8EUGGG1C32144101336_gulu, V5EUHHG1P12100100418_89011337751, V5EUHHG1P22111000028_89011337751] How I can extract only this value "89011337751" and write it to a variable ? Is it possible to do it with the bash, powershell or other scripts? Asked By: Vitaliy Kuzmenko || Source Answers: This …

Total answers: 1

i cant change Execution Policy on windows powershell

i cant change Execution Policy on windows powershell Question: powershell image hi, i am trying to change the execution policy on powershell to be able to use pycharm since it gives me error otherwise, but when i try to do that, after i type "Y" or "A" and press enter it doesnt do anything at …

Total answers: 1

Run Powershell script from Python?

Run Powershell script from Python? Question: At the end of some processing in Python in Windows I am trying to eject an USB SD card. Researching here it seems there are two ways in which to do it; call a PowerShell program or run PowerShell within Python. Can anyone offer me any guidance. Please keep …

Total answers: 2

get Citrix VDIs using Python instead of Powershell

get Citrix VDIs using Python instead of Powershell Question: I have to get the list(+ some parameters) of all the VDIs(Virtual Desktop Interfaces) which are connected to a Citrix Broker. In PowerShell, I do it like this: … # credentials used for remote connection to citrix controllers $pass=$(ConvertTo-SecureString -String $env:CitrixPassword -AsPlainText -Force) [pscredential]$creds = New-Object …

Total answers: 1

Rundeck Node Authentication with domain account

Rundeck Node Authentication with domain account Question: I have installed Rundeck 4.8.0 on Redhat 9. I have a Windows 2022 Server node. I have a local account on the node called rundeck and it’s in the Administrators group. In Rundeck key storage, I made a password key, with the password for the local rundeck account. …

Total answers: 1