Use this tag for version specific questions about Windows PowerShell version 7.0. When using this tag also include the more generic [powershell] tag where possible. For general PowerShell topics, use the [powershell] tag.
Questions tagged [powershell-7.0]
216 questions
0
votes
0 answers
get-help does not work in PS5 but does work in PS7
I'm working on some PowerShell code that used to work and has broken. I noticed in PS5 when I run get-help against the below help section I receive:
Get-Help : Get-Help could not find C:\PATH\program.ps1 in a help file in this session.
If I run the…

Grant Curell
- 1,321
- 2
- 16
- 32
0
votes
1 answer
WARNING: Unable to find module repositories. "Get-PSRepository" ubuntu20.04
I was trying to install Az-Module in my Ubuntu power-shell, But It wasn't installing than I double checked the PSRepository and I came to know that I don't have any repository there.
I also have tried to Register the default repository But it didn't…

Muhammad_Bilal
- 107
- 1
- 2
- 14
0
votes
1 answer
PowerShell 7 Remoting from Azure DevOps Pipeline
We were using Azure DevOps Pipelines and PowerShell Remoting to execute PS1 scripts:
trigger: none
jobs:
- job: PSRemoting
timeoutInMinutes: 5760
pool:
name: 'DevOps-Agent2-VM'
steps:
- checkout: none
- task:…

WinBoss
- 879
- 1
- 17
- 40
0
votes
1 answer
I keep getting Quota violation error in PowerShell when changing Firewall rules
I want to change all Firewall rules to only apply to Public profile, so I tried this:
$rules = Get-NetFirewallRule | select Name
$rules | ForEach-Object {Set-NetFirewallRule -Name $rules -Profile Public}
but i keep getting Quota violation errors…
user20225877
0
votes
1 answer
PowerShell 7: How can I use a previous parameter to influence a current parameter with Register-ArgumentCompleter for autocompletion?
I have a basic powershell function that benefits from autocompletion, but I cannot figure out how to use a previous parameter value (in this case call it show) be used to construct the path to lookup another auto completed value…

openCivilisation
- 796
- 1
- 8
- 25
0
votes
0 answers
Remote Trubleshooting Error: Connecting to remote server failed with following error message Access is Denie
I have Two users (User-A, Administrator) in same Domain. How can I Invoke remote Command by logging as User-A and execute that command using Administrator credential without running powershell as administrator?

Hemendr
- 673
- 6
- 12
0
votes
1 answer
How to remotely start service on Azure VM with powershell 5.1
How can I start a service on an Azure VM remotely? It seems impossible to do without Powershell being "Run as Administrator". Is there a way to launch as admin?
(I would pass in Get-Credential parameter, but unfortunately the 5.1 version Set-Service…

igor984
- 1
0
votes
0 answers
Create operations in APIM with requests and parameters throws ValidationError
I am trying to migrate an apim instance programatically using azure powershell (I can't use Backup/restore in my case).
I am succesfully getting apis, revisions, policies, schemas, etc...
But when I try to create operations with requests, responses,…

Xav Sc
- 489
- 1
- 5
- 23
0
votes
0 answers
How to trim all cell value in Import-Csv so that binding ByPropertyName using pipeline binding never fails?
I have a ModuleList.csv file below having Module Names in one column with header named Module
Module
Microsoft.PowerShell.Archive
Microsoft.PowerShell.Diagnostics
Powershell Get-Command accepts parameter Module name as ByPropertyName
Example: help…

Hemendr
- 673
- 6
- 12
0
votes
1 answer
Commandlet with Parameter accepting ByPropertyName works for one parameter but not for other parameter
Get-Command Accepts both Module and Name using ByPropertyName
help Get-Command -Parameter *
-Module
Position? named
Accept pipeline input? True (ByPropertyName)
-Name
…

Hemendr
- 673
- 6
- 12
0
votes
1 answer
Error loading Microsoft.SqlServer.Management.IntegrationServices assembly registered in the GAC with powershell 7
I'm trying to convert a PowerShell script from PowerShell 5 (Windows PowerShell) to run it with PowerShell 7 (PowerShell core)
The purpose of this script is to install IntegrationServices projects to the specified SQL Server instance.
The problem…

sergiom
- 4,791
- 3
- 24
- 32
0
votes
0 answers
Powershell script to list running processes and CPU utilization using Get-Counter is not returning all processes
I found the following PS command to list running processes sorted by CPU utilization:
Get-Counter -ErrorAction SilentlyContinue '\Process(*)\% Processor Time' |
Select-Object -ExpandProperty countersamples |
Select-Object -Property…
user736893
0
votes
1 answer
New-AzWebAppSSLBinding - The specified network password is not correct
I trying to Assign Already created SSL Lets Encrypt certificate to azure app service.
DNS zone in app service already configured to (1.test.webapp1)
$Site = Get-AzWebApp -ResourceGroupName "MyRG" -Name "webapp1"
New-AzWebAppSSLBinding `
-Name…

Kraken194
- 53
- 9
0
votes
1 answer
How do I run a Powershell7 Script upon creation of a Windows VM Resource with Terraform (Azure)
I have an azure windows VM and I want to be able to run a powershell 7 script (powershell 7+ 100% required) upon creation. The problem is that none of the vm's come with powershell 7. Do I have any options? This needs to be fully automated…

stackunderflow123
- 45
- 1
- 7
0
votes
1 answer
How to prevent multiple instances of the same PowerShell 7 script?
Context
On a build server, a PowerShell 7 script script.ps1 will be started and will be running in the background in the remote computer.
What I want
A safenet to ensure that at most 1 instance of the script.ps1 script is running at once on the…

Joseph Saliba
- 37
- 4