Questions tagged [powershell-v6.0]

For issues related to the open source PowerShell 6.0

Resources:

  1. github project
  2. PowerShell Documentation
55 questions
0
votes
1 answer

Publishing a PowerShell script to AWS Lambda

I'm trying to deploy a PowerShell core script to AWS Lambda. I'm deploying from an EC2 instance. I'm following AWS Lambda Deployment Package in PowerShell - AWS Lambda, and trying to deploy the exact script they describe. It looks like it's going to…
0
votes
1 answer

Pass a System.Text.RegularExpressions.Regex as function parameter in Powershell 6

Hello Powershell Experts, I want to write a Powershell function that takes a System.Text.RegularExpressions.Regex as a parameter. My function header goes like this: function Foo { Param([System.Text.RegularExpressions.Regex] $myRegex) #…
user3291342
  • 101
  • 2
  • 9
0
votes
1 answer

Azure Traffic Manager make sure no traffic is flowing after disabling endpoint

I am trying to find a powershell command which helps find out a way that there is no open connections or any traffic is flowing to endpoint1 or confirm traffic is moving smoothly to endpoint2 after disabling endpoint1: $e[0].EndpointStatus =…
NoviceMe
  • 3,126
  • 11
  • 57
  • 117
0
votes
0 answers

Split File name for max( Modified date)

I have a requirement to exclude files based on year, country name and last modified date from that particular year and rest files from that particular year and the country moved to an archive folder for an example SS_MM_Master_finland_2018.xlsx…
Shree S
  • 17
  • 7
0
votes
1 answer

ADSI query running well on some boxes and failing on others

I am working on a PowerShell script for a customer to pull information from Servers before they are decommissioned. I have had to jump through a couple of hoops, as they have 2008 and even some 2003 servers, which don't always support the same…
JLogan3o13
  • 103
  • 7
0
votes
1 answer

How to change powershell "pwsh" to STA ApartmentState

I'm trying to port some scripts from poweshell 5.0 to the new pwsh powershell 6 and i've noticed that there is no -sta parameter anymore. How can I set the ApartmentState of pwsh? I can;t find anything about it and it looks like it's defined in…
Marco
  • 984
  • 10
  • 18
0
votes
1 answer

Math unexpectedly produces infinity '∞'

The goal is to have a progress bar monitoring an external process that writes the step it is on into a watch file. If I do not have a Start-Sleep in the loop, it will produce messages about not being able to convert infinity. Why is this? I am…
lit
  • 14,456
  • 10
  • 65
  • 119
0
votes
0 answers

Running Opencover and ReportGenerator in Docker container

Im trying to run opencover and reportgenerator for an asp.net core application using this image microsoft/aspnetcore-build:2.0.0 , I have an opencover powershell script, and want to install powershell for linux inside the container to run that…
-1
votes
1 answer

Powershell Call cancelled

I was running Get-CimInstance -Namespace root/CIMV2 -ClassName CIM_Component | Out-File -Encoding utf8 .\CIM_Component.txt and received Get-CimInstance : Call cancelled At line:1 char:2 + (Get-CimInstance -Namespace root/CIMV2 -ClassName…
Whitequill Riclo
  • 788
  • 2
  • 8
  • 19
-1
votes
3 answers

REGEX Pattern for Username inside a longer string

MAC OSX, PowerShell 6.1 Core I'm struggling with creating the correct REGEX pattern to find a username string in the middle of a url. In short, I'm working in Powershell Core 6.1 and pulling down a webpage and scraping out the "li" elements. I write…
JasonH
  • 23
  • 1
  • 4
1 2 3
4