119,260 questions
- Bountied 1
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
2
answers
38
views
Problem when running Docker container inside Powershell script [duplicate]
Environment
Windows 11 23H2
Powershell v5.1
Docker desktop 4.49.0
Issue
I have a weird problem when I use variables as arguments for a docker run command inside a Powershell script (.ps1 file).
If ...
0
votes
0
answers
26
views
Delete DHCP-Reservation via Python Script
I want to delete DHCP Reservations using a Python script and have the following code:
import tkinter as tk
from tkinter import messagebox
import subprocess
def delete_reservation():
dhcp_server = ...
1
vote
1
answer
51
views
How do I Download Poppler and Tesseract Programmatically with PowerShell
In Python, there are two libraries which are often used in tandem, Poppler and Tesseract. They both need external downloads to function:
Poppler, Tesseract. The general recommendation for Windows is ...
2
votes
2
answers
85
views
Kotlin script - can't run if full path contains space [closed]
Kotlin compiler is located in C:\kotlinc\bin, when trying to run any script that is located in a path with space - it fails with message
InvalidPathException: Illegal char <:> at index 2: /H:/My%...
-1
votes
0
answers
70
views
Windows Firewall: Program-specific Allow rule not overriding port-based Block rule for outbound SMTP (Port 25) [closed]
I'm trying to configure Windows Firewall to allow only a specific application (MailEnable SMTP) to use outbound port 25, while blocking all other applications. However, the program-specific Allow rule ...
2
votes
2
answers
84
views
powershell compress-archive verbose output to text file
I have a powershell command that I want to execute and direct the verbose output to a text file.
Compress-Archive -Path $currentLogDir_TempPathString -DestinationPath $currentLogDir_ArchiveFileName -...
0
votes
2
answers
100
views
Windows 11 powershell run executable with parameter switches when IF statement false
Windows 11 Power shell
I'm trying to run the following IF statement in power shell - basically to check if a file exists on encrypted drive P, if it doesn't then create the encrypted drive. I get an ...
-3
votes
0
answers
64
views
Why DBAtools are not working with Powershell 7? [closed]
per chatgpt PowerShell 7 runs on .NET Core, which does not unload assemblies from the main AppDomain.
Removing a module only detaches its cmdlets and functions — not its loaded assemblies.
So once ...
-3
votes
0
answers
59
views
Chrome debugging protocol (CDP) require calling DOM.getDocument to get nodeId [closed]
When working with CDP, I found something strange. This is the code which will connect to CDP to set file for 2 input with attribute type equal file:
function Receive-CDP {
$ms = New-Object System....
Advice
1
vote
1
replies
87
views
How to open the Developer PowerShell for x64/amd64?
The start menu features a Developer PowerShell for VS 2022 which defaults to x86:
PS C:\> (Get-Command link.exe).Source
C:\Program Files\Microsoft Visual Studio2022円\Professional\VC\Tools\MSVC14円....
1
vote
0
answers
65
views
Invoke-WebRequest URL encoding
I want to retrieve content from web page. However, I tried above method but the error still come when the query string contain Chinese character.
code
$json = Get-Content -Encoding utf8 -Path "./...
0
votes
1
answer
70
views
C# Compress-Archive not storing full folder names
I have a log folder structure that's similar to this:
D:\
+ Logs
+ Prod
+ API1.domain.com
+ Server1.domain.com
+ Server2.domain.com
+ API2.domain.com
+ Server1.domain.com
...
5
votes
1
answer
84
views
How get Powershell v7.5 to expand $env from command line like v5.1
Passing an environment variable from command line works differently in Powershell v7.5 compared to v5.1. Is there some overall setting for PS 7.5 to provide compatibility? Or an explanation of why ...
2
votes
3
answers
112
views
Is it possible to state an object's property from a string in Powershell? [duplicate]
I have:
$method = "property.childproperty"
How can I get to $foo = $object.property.childproperty by using the $method variable?
0
votes
0
answers
59
views
error: Package is incompatible with 'all' frameworks in project when package does not already exist in C:\<USER>\.nuget\packages
I have a powershell script calling dotnet add
Script:
dotnet add `"$projectFilePath`" package "$packageName" --source "$dorsetIcsSourceName" --version "$...