All Questions
Tagged with powershell python
1,788 questions
0
votes
0
answers
28
views
Can't deactivate python venv on vscode after recent update [closed]
I've recently updated vscode to the most recent version, and whenever I open up a new shell or cmd it activates the venv in that directory, and that's fine and expected as before.
But now it doesn't ...
1
vote
0
answers
57
views
How to save transparent image (PNG) to clipboard in Windows 11?
I need a Windows 11 solution to copy a PNG image with transparency to the clipboard. My current methods fail to preserve transparency. I have a program that outputs a png image with a transparent ...
0
votes
0
answers
76
views
Replicate successful PowerShell SAML request code into Python
I'm trying to perform SAML authentication against the CyberArk Password Vault application. I was given this PowerShell code by CyberArk for performing this SAML authentication, and it works great and ...
2
votes
0
answers
41
views
Why does VS Code Debugger reset `PATH` from `.env`, breaking subprocess behavior in debug mode only?
I'm facing an unusual issue when using subprocess.Popen in Python while debugging in VS Code. The behavior of the PATH environment variable changes only in debug mode, and subprocess calls behave ...
3
votes
1
answer
80
views
PowerShell Subprocess Launched via debugpy Doesn’t Inherit Environment Variables (but cmd.exe does)
Problem
I'm encountering an issue where launching PowerShell via Python’s subprocess.Popen() works as expected during normal execution, but in debug mode (using debugpy/cursor) key environment ...
2
votes
2
answers
89
views
Is there a way to automate activating the virtualenv in Powershell (in Windows)?
I know that to activate virtualenv it's just .venv/Scripts/activate.ps1 but I was wondering if there's a way of having powershell do it automatically?
Existing ones just talk about activating it, but ...
-1
votes
0
answers
129
views
Significant Python Script Performance Degradation in PowerShell/Batch After Windows 11 Update - Seeking Configuration Insights
I hope you're all doing well!
I need some help regarding the execution of Python programs under PowerShell.
I have a basic ETL solution developed in Python that extracts data from Excel spreadsheets, ...
0
votes
1
answer
38
views
WinRM Certificate Authentication Fails with 401 Error on Windows Server 2022
I'm encountering an issue with WinRM certificate authentication on a Windows Server 2022 CIS STIGs image. The server is running the WinRM service, and I'm trying to connect from an Ubuntu Pro 20.04 ...
0
votes
1
answer
57
views
How to run a task in the poetry shell
I'm trying to schedule an automated task that runs a python script "myscript1.py" in VS Code.
First step is to run the command "poetry shell" which spawns a new shell:
PS C:\dir1\...
1
vote
1
answer
64
views
Powershell and CMD combining command-line filepath arguments to Python
I was making user-entered variable configurable via command line parameters & ran into this weird behaviour:
PS D:> python -c "import sys; print(sys.argv)" -imgs ".\Test V4\Rilsa\...
0
votes
2
answers
115
views
Environment variable in conda is not aligning with os.environ, possibly because of un-escaped dollar-sign
I am trying to set an environment variable SOME_VAR in a conda environment. The value begins with a $ character. Initially I didn't properly single-quote the variable value, which might have caused a ...
1
vote
1
answer
83
views
In VSCode with python extension why does a powershell of terminal prompt not show the folder I open?
I found the same problem which is with a path containg brackets.
When the path contains square brackets, spawning a new terminal using powershell and "terminal.integrated.cwd" does not ...
0
votes
0
answers
29
views
Issue transferring emails from Shared Mailbox to Teams Mailbox in Exchange
I have a shared mailbox with a lot of emails. I need to move all these emails to a teams email group.
I'm hoping there's something simple I'm missing.
I'm open to using other languages if existing ...
0
votes
1
answer
61
views
Powershell cannot find module, but can find others in the same folder
I am trying to create a batch file that launches a python script which uses openpyxl and pyexcel. Powershell is fine with openpyxl but can't seem to find pyexcel even though they are in the same ...
0
votes
1
answer
130
views
How to list all app/software/programs installed on Windows 11 using a Python script
I develop a Python script to list all installed apps in my Windows 11 system. I would like to replicate the same results displayed in Settings > App > Installed Apps. Optionally, I would like to ...