Questions tagged [powershell-5.0]
For questions specific to Powershell Version 5
128 questions
2
votes
1
answer
54
views
How to pipe binary data from Linux to Windows over ssh?
I have binary data on Linux which I need to transfer to Windows to which I have an ssh access.
The data is stored in pass thus I would prefer not to first store it to a temporary file and then ...
1
vote
0
answers
83
views
i can access DB via SSMS but not via powershell
I have below script and i am trying to connect to DB via PowerShell but getting error "Exception calling "Open" with "0" argument(s): "Login failed for user".
# ...
1
vote
1
answer
136
views
Export-WindowsImage Loop Not working with SWM files but works with WIM files
I needed to update some drivers on some Win11 installation thumb drives we have. These were made via the Media Creation Tool from MS so, these aren't some fancy homemade images. The thumb drives ...
0
votes
1
answer
186
views
How to find wget download location for Amazon Corretto in PowerShell 5?
I would like to run a package for Python, py-causal, that uses a Java library, Tetrad. I am stuck at getting Java on Windows 10.
The Tetrad repo has a link to this Amazon page, where I ended up on the ...
-1
votes
2
answers
396
views
Run an external command in PowerShell that has a variable number of parameters?
PS 5.1.22621.4391 (and I'm stuck with it)
Sometimes I need to run this:
plink -t -load "$Session" -batch -m $ShellFile
but sometimes I need to add another option:
plink -t -load "$...
4
votes
1
answer
485
views
PowerShell or plink is eating single quotes inside double quotes
PSVersion 5.1.22621.4391
plink: Release 0.82
I've pored through Properly escape awk command from powershell over plink but one of those programs keeps eating single quotes.
Is there any way to run ...
0
votes
0
answers
406
views
Why some files are not visible for 'Get-FileHash' in PowerShell?
I have a similar problem to the one mentioned in Windows PowerShell: Get-FileHash and long file paths ,
generating the same error but it is not connected to path length as is there. With code:
Get-...
0
votes
1
answer
74
views
powershelll profile which only prints in interactive
Why is it so hard to have a powershell profile which does certain things only if it is executed inside an interactive host.
With Linux shells it is quite easy to differentiate between profile and rc ...
0
votes
0
answers
385
views
Issues with deleting files from System 32 using a PowerShell script
this is the script I'm working with
# Define the top-level folder and the list of files
$topFolder = "C:\Windows\System32" # Update to System32 directory
$files = @(
"mstsc.exe&...
2
votes
1
answer
1k
views
Is this ResetWindowsSearchBox.ps1 the same as a Delete and Rebuild Index in Indexing Options?
We have some windows.db files on a few machines that have grown to massive sizes in Windows 11; and I was wondering how to use Powershell 5 to clean these up.
I am aware of the Control Panel’s ...
0
votes
1
answer
996
views
Powershell Crashes upon launch
Long-time issue, haven't gotten anywhere. Windows Server 2019 Datacenter (1809 - OS Build 17763.5576), Enterprise environment with 14 physical servers, all same OS. When I launch powershell in this ...
0
votes
0
answers
1k
views
PowerShell: Diagnose timeout vs. connection refused on TCP port with Test-NetConnection
I frequently need to diagnose network connectivity issues and I'm currently using Test-NetConnection in PowerShell (Version 5.1). The output tells me if a port is reachable. In case it's not, I would ...
1
vote
0
answers
38
views
Auto Load PowerShell Modules (PWSH) To Windows PowerShell [duplicate]
Below List of Modules was installed on PowerShell 7 (a.k.a PWSH) in my PC:
AzureAD
ManageBootStick
PoshFunctions
PowerShellAI
PowerShellAI.Functions
PowerShellAIAssistant
PSWriteColor
SMBIOS
SysInfo
...
2
votes
1
answer
6k
views
Get-WindowsUpdate does not update the Windows Update GUI
Having an issue that I cannot seem to find any information on.
I'm using the Get-WindowsUpdate and Get-WUList modules in PowerShell to attempt to download and install Windows updates.
$...
0
votes
1
answer
130
views
Recalling system info in PS
I'm sure this is an easy one for the community, but it's got me puzzeled.
If I create a var in PS, say "$s" then assign "systeminfo /s {hostname}" to the var ($s = systeminfo /s {...