profile
viewpoint
PowerShell Team PowerShell Redmond https://microsoft.com/powershell https://microsoft.com/powershell

issue closedPowerShell/Win32-OpenSSH

openssh can't keep the child processes running, once the parent process ends

Please answer the following

"OpenSSH for Windows" version 8.0.0.0 beta

Server OperatingSystem Windows Server 2012 Standard

Client OperatingSystem SUSE Linux Enterprise Server 12

What is failing command: ssh windows-host "perl.exe script123.pl"

I am calling multiple scripts inside script123.pl, which in turns creating a tree of child process under parent process. But the problem I am facing with OpenSSH is, when parent process gets completed, it terminates the session and kills the child processes along.

Expected output The parent script(parent process) is calling other scripts in background, and it comes out without disturbing the child scripts (child processes). This is the expected behavior, it works with other SSH tools for windows, eg: SSH Tectia .

closed time in 5 minutes

sudhirraghuwanshi

issue commentPowerShell/Win32-OpenSSH

openssh can't keep the child processes running, once the parent process ends

check this one - https://github.com/PowerShell/Win32-OpenSSH/issues/1032

sudhirraghuwanshi

comment created time in 5 minutes

Pull request review commentPowerShell/PowerShell

Add support to ternary operator

 private enum CaptureAstContext             Ast ast,             CaptureAstContext context,             MergeRedirectExprs generateRedirectExprs = null)

This change is no longer necessary, right?

daxian-dbw

comment created time in 6 minutes

issue closedPowerShell/PSReadLine

c d Space " d : \ 学 习 资 料 \ 就 业 班 资 料 \ v u e \ v u e 项 目 5 - 1 0 天 资 料 \ 7 . v u e - 项 目 实 战 d a y 5 \ c o d e

<!-- Before submitting your bug report, please check for duplicates, and +1 the duplicate if you find one, adding additional details if you have any to add.

There are a few common issues that are commonly reported.

If there is an exception copying to/from the clipboard, it's probably the same as https://github.com/PowerShell/PSReadLine/issues/265

If there is an exception shortly after resizing the console, it's probably the same as https://github.com/PowerShell/PSReadLine/issues/292 -->

Environment data

<!-- provide the output of the following:

& {
    "PS version: $($PSVersionTable.PSVersion)"
    $v = (Get-Module PSReadline).Version
    $m = Get-Content "$(Split-Path -Parent (Get-Module PSReadLine).Path)\PSReadLine.psd1" | Select-String "Prerelease = '(.*)'"
    if ($m) {
        $v = "$v-" + $m.Matches[0].Groups[1].Value
    }
    "PSReadline version: $v"
    if ($IsLinux -or $IsMacOS) {
        "os: $(uname -a)"
    } else {
        "os: $((dir $env:SystemRoot\System32\cmd.exe).VersionInfo.FileVersion)"
    }
    "PS file version: $($name = if ($PSVersionTable.PSEdition -eq "Core") { "pwsh.dll" } else { "powershell.exe" }; (dir $pshome\$name).VersionInfo.FileVersion)"
    "BufferWidth: $([console]::BufferWidth)"
    "BufferHeight: $([console]::BufferHeight)"
}

-->

Steps to reproduce or exception report

closed time in 6 minutes

woshihaorenbushihuairen

issue openedPowerShell/PowerShell

RHEL Repo broken for new 6.2.2 release

Fedora 30 Error: Error downloading packages: Cannot download powershell-6.2.2-1.rhel.7.x86_64.rpm: All mirrors were tried

created time in 16 minutes

issue openedPowerShell/Announcements

Microsoft Security Advisory CVE-2019-1167: Windows Defender Application Control Security Feature Bypass Vulnerability

We are using GitHub’s Security Advisory feature, the actual advisory is here: https://github.com/PowerShell/PowerShell/security/advisories/GHSA-5frh-8cmj-gc59

created time in 29 minutes

issue closedPowerShell/PowerShell

What is the plan for building binary modules that work on PowerShell 7 and later?

Today we have the PowerShell Standard 5.1 Nuget package for binary modules that work on PowerShell 5.1 and PowerShell Core 6.x and later.

What is the plan for binary modules that only work on PowerShell 7.0 and later, due to their dependencies on new public interfaces available only in that version? As part of the 7.0 preview process, are you going to build/publish a Microsoft.PowerShell.7.ReferenceAssemblies Nuget package? Or will there be a different successor to PowerShell Standard 5.1? And when will we start seeing such a package available as part of the 7.0 preview release process?

closed time in 30 minutes

KirkMunro

issue commentPowerShell/PowerShell

What is the plan for building binary modules that work on PowerShell 7 and later?

Thanks, missed that in my search. I'll close this since it's a duplicate.

KirkMunro

comment created time in 30 minutes

pull request commentPowerShell/PowerShell

Update README.md and metadata.json for next releases

@adityapatwardhan, successfully started retry of PowerShell-CI-static-analysis

adityapatwardhan

comment created time in 30 minutes

issue commentPowerShell/PowerShell

What is the plan for building binary modules that work on PowerShell 7 and later?

I think I noticed this and filed an issue about the lack of reference libraries for recent PS versions. Let me see... Yeah, #10011 is the one. 😄

KirkMunro

comment created time in 31 minutes

pull request commentPowerShell/PowerShell

Update README.md and metadata.json for next releases

@PoshChan please retry static

adityapatwardhan

comment created time in 31 minutes

pull request commentPowerShell/PowerShell

Add automated RPM signing to release build

:tada:v6.2.2 has been released which incorporates this pull request.:tada:

Handy links:

TravisEz13

comment created time in 33 minutes

pull request commentPowerShell/PowerShell

Update copyright symbol for NuGet packages

:tada:v6.2.2 has been released which incorporates this pull request.:tada:

Handy links:

adityapatwardhan

comment created time in 33 minutes

pull request commentPowerShell/PowerShell

Build(deps): Bump Microsoft.ApplicationInsights from 2.9.1 to 2.10.0

:tada:v6.2.2 has been released which incorporates this pull request.:tada:

Handy links:

dependabot-preview[bot]

comment created time in 33 minutes

pull request commentPowerShell/PowerShell

Switch from BMP to PNG for graphical MSI installer assets

:tada:v6.2.2 has been released which incorporates this pull request.:tada:

Handy links:

joeyaiello

comment created time in 33 minutes

pull request commentPowerShell/PowerShell

Build(deps): Bump System.Net.Http.WinHttpHandler from 4.5.3 to 4.5.4

:tada:v6.2.2 has been released which incorporates this pull request.:tada:

Handy links:

dependabot-preview[bot]

comment created time in 33 minutes

issue openedPowerShell/PowerShell

What is the plan for building binary modules that work on PowerShell 7 and later?

Today we have the PowerShell Standard 5.1 Nuget package for binary modules that work on PowerShell 5.1 and PowerShell Core 6.x and later.

What is the plan for binary modules that only work on PowerShell 7.0 and later, due to their dependencies on new public interfaces available only in that version? As part of the 7.0 preview process, are you going to build/publish a Microsoft.PowerShell.7.ReferenceAssemblies Nuget package? Or will there be a different successor to PowerShell Standard 5.1? And when will we start seeing such a package available as part of the 7.0 preview release process?

created time in 33 minutes

created tagPowerShell/PowerShell

tagv6.2.2

PowerShell for every system!

created time in 35 minutes

pull request commentPowerShell/PowerShell

Add automated RPM signing to release build

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

TravisEz13

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

Update copyright symbol for NuGet packages

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

adityapatwardhan

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

Build(deps): Bump System.Net.Http.WinHttpHandler from 4.5.3 to 4.5.4

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

dependabot-preview[bot]

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

Integrate building NuGet package in the coordinated build

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

adityapatwardhan

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

Integrate building NuGet package in the coordinated build (#8947)

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

adityapatwardhan

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

Build(deps): Bump Newtonsoft.Json from 12.0.1 to 12.0.2 in /tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility

:tada:v6.1.5 has been released which incorporates this pull request.:tada:

Handy links:

dependabot-preview[bot]

comment created time in 38 minutes

pull request commentPowerShell/PowerShell

New `New-PSBreakpoint` cmdlet & new `-Breakpoint` parameter for `Debug-Runspace`

@KirkMunro

I understand your frustration, but we need a way to manage extensive changes to the code base and RFCs are the current way to do that. PRs are fine for small scope changes, but I feel this has gone beyond that and we need step back and think carefully about what we want to do and how to move forward.

I know that RFCs are a slow process, but really it is meant to be so that we don't make decisions we later regret.

Also, I have other high priority work to do so I cannot always be as responsive as I would like.

Regarding RFCs, I find that smaller, well scoped, clear and concise writing gets better and quicker responses. Verbose writing is harder to parse and understand. Large scope changes are harder approve since it is difficult to think through all implications, including compatibility and documentation. In general I prefer incremental changes where possible.

TylerLeonhardt

comment created time in 38 minutes

created tagPowerShell/PowerShell

tagv6.1.5

PowerShell for every system!

created time in 38 minutes

Pull request review commentPowerShell/PowerShell

Add support to ternary operator

 public object VisitPipeline(PipelineAst pipelineAst)             return pipelineAst.GetPureExpression().Accept(this);         } +        public object VisitTernaryExpression(TernaryExpressionAst ternaryExpressionAst)+        {+            CheckIsConstant(ternaryExpressionAst, "Caller to verify ast is constant");+            return CompileAndInvoke(ternaryExpressionAst);+        }

Good point. I updated it to be:

object condition = ternaryExpressionAst.Condition.Accept(this);
return LanguagePrimitives.IsTrue(condition)
    ? ternaryExpressionAst.IfTrue.Accept(this)
    : ternaryExpressionAst.IfFalse.Accept(this);

Let me know if you think it's not right.

daxian-dbw

comment created time in 44 minutes

Pull request review commentPowerShell/PowerShell

Add support to ternary operator

 public Expression GenerateCallContains(Expression lhs, Expression rhs, bool igno                 rhs.Cast(typeof(object)));         } +        public object VisitTernaryExpression(TernaryExpressionAst ternaryExpressionAst)+        {+            var expr = Expression.Condition(+                CaptureAstResults(

Were you thinking about CaptureStatementResults? I used CaptureAstResults intentionally to avoid the unnecessary things in the CaptureStatementResults. What CaptureAstResults does in this case is just replacing current pipe with a temp pipe (list) and then convert the expression result to a bool value using PSPipelineResultToBoolBinder.

daxian-dbw

comment created time in an hour

issue openedPowerShell/platyPS

Unable to find type [Markdown.MAML.Model.MAML.MamlCommand]

<!-- If a bug, please fill the following template. If anything else, feel free to remove the template and elaborate your point in your own words. -->

Steps to reproduce

Run the container

docker run -it --name platyps debian:latest

Install prereqs and PowerShell 6

apt-get update && apt-get install -y liblttng-ust0 libicu57 liburcu4 liblttng-ust-ctl2

wget https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/powershell_6.2.1-1.debian.9_amd64.deb --no-check-certificate

Copy over PlatyPS and any PS module

docker copy C:\path\to\platyps platyps:/root/ docker copy C:\path\to\your\module platyps:/root/

Run powershell

pwsh

Import your modules

Import-Module /root/platyps/platyps.psm1 Import-Module /root/YourModule

Make your output director

mkdir func

Run PlatyPS

$MDHelp = @{ 'Module' = "YourModule" 'OutputFolder' = "/func" 'AlphabeticParamsOrder' = $True 'Verbose' = $True } New-MarkdownHelp @MDHelp

Error occurs

Unable to find type [Markdown.MAML.Model.MAML.MamlCommand]. At /root/PlatyPS/0.9.0/platyPS.psm1:162 char:17

Expected behavior

Convert the help into markdown

Actual behavior

Errors out: Unable to find type [Markdown.MAML.Model.MAML.MamlCommand].

Environment data

<!-- specify the version, i.e. -->

PowerShell 6.2.1 on Debian Stretch v0.14.0

created time in an hour

Pull request review commentPowerShell/PowerShell

Format-Hex: Improve mixed-collection piped input and piped streams of input

 public sealed class FormatHex : PSCmdlet     {         private const int BUFFERSIZE = 16; +        /// <summary>+        /// For cases where a homogenous collection of bytes or other items are directly piped in, we collect all the+        /// bytes in a List&lt;byte&gt; and then output the formatted result all at once in EndProcessing().

@iSazonov further output samples if we opt to group all primitives. I'm using Format-Hex -InputObject for the mockup, but the proposal here is that piping the input to the cmdlet would result in the same behaviour.

Byte

I think this one's essentially a no-brainer. It seems weirder not to.

$a = [byte[]] ( [byte]::MinValue..[byte]::MaxValue | Get-Random -Count 32 )
Format-Hex -InputObject $a

image

$a = 1..64 -as [byte[]]
Format-Hex -InputObject $a

image

Char

$a = [char[]] ( [char]::MinValue..[char]::MaxValue | Get-Random -Count 32 )
Format-Hex -InputObject $a

image

$a = 1..64 -as [char[]]
Format-Hex -InputObject $a

image

Int16

$a = [short[]] ( [short]::MinValue..[short]::MaxValue | Get-Random -Count 32 )
Format-Hex -InputObject $a

image

$a = 1..64 -as [short[]]
Format-Hex -InputObject $a

image

Int32

$a = [int[]] @(Get-Random -Minimum ([int]::MinValue) -Maximum ([int]::MaxValue) -Count 16)
Format-Hex -InputObject $a

image

$a = 1..64 -as [int[]]
Format-Hex -InputObject $a

image

Int64

$a = [long[]] @(Get-Random -Minimum ([long]::MinValue) -Maximum ([long]::MaxValue) -Count 16)
Format-Hex -InputObject $a

image

$a = 1..32 -as [long[]]
Format-Hex -InputObject $a

image

Double

$a = [double[]] @(Get-Random -Minimum ([double]::MinValue) -Maximum ([double]::MaxValue) -Count 16)
Format-Hex -InputObject $a

image

$a = 1..32 -as [double[]]
Format-Hex -InputObject $a

image

Note: I tried to do this with [decimal] as well, but the cmdlet isn't currently capable(?) of transforming [decimal] values to hexadecimal. Not sure why.

Did I miss anything? :blush:

vexx32

comment created time in an hour

startedPowerShell/PowerShell

started time in 2 hours

Pull request review commentPowerShell/PowerShell

Add support to ternary operator

 internal Ast CommandRule(bool forDynamicKeyword)          #region Expressions -        private ExpressionAst ExpressionRule()+        private ExpressionAst ExpressionRule(bool endNumberOnTernaryOpChars = false)         {             // G  expression:             // G      logical-expression             // G             // G  logical-expression:+            // G      binary-expression+            // G      ternary-expression+            // G+            // G  ternary-expression:+            // G      binary-expression  new-lines:opt   '?'   new-lines:opt   ternary-expression   new-lines:opt   ':'   new-lines:opt   ternary-expression++            RuntimeHelpers.EnsureSufficientExecutionStack();+            var oldTokenizerMode = _tokenizer.Mode;+            try+            {+                SetTokenizerMode(TokenizerMode.Expression);++                List<Ast> componentAsts = new List<Ast>();+                ExpressionAst condition = BinaryExpressionRule(endNumberOnTernaryOpChars);+                if (condition == null)

I didn't consider that. On a quick thought, it would require ? and : with the lowest precedence order, and the logic change would make the operator precedence parser more confusing to read. I don't see the benefit of doing so. ?: is not a binary operator and IMO, dealing with it in a separate method is cleaner.

daxian-dbw

comment created time in 2 hours

startedPowerShell/PowerShell

started time in 2 hours

issue commentPowerShell/PowerShellGet

Find-Module options -AllowPrerelease and -AllVersions do not return proper results

@petrsnd thanks for posting about this issue, and for the detailed repro-case. I am having some trouble reproducing this with Modules published to the PowerShell Gallery (rather than private repos)--would you be able to provide the results of the command Get-InstalledModule PowerShellGet, PackageManagement based on the error messages its possible that you may need to update to a newer version of PowerShellGet which is able to handle pre-release versioning

RepeatDaily

comment created time in 2 hours

issue commentPowerShell/PowerShellGet

Find-Module options -AllowPrerelease and -AllVersions do not return proper results

@SydneyhSmith

I have this same issue. I was trying to use Find-Module against the feed for a module I maintain.

https://www.powershellgallery.com/packages/safeguard-ps

You can reproduce the error I am seeing using this command:

PS> Find-Module safeguard-ps -AllVersions

You will see many errors such as:

Cannot convert value "2.2.128-pre" to type "System.Version". Error: "Input string was not in a correct format."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7156 char:9
+         $PSGetItemInfo = Microsoft.PowerShell.Utility\New-Object PSCu ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastParseTargetInvocation

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7204 char:9
+         $PSGetItemInfo.PSTypeNames.Insert(0, "Microsoft.PowerShell.Co ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Cannot convert value "2.2.126-pre" to type "System.Version". Error: "Input string was not in a correct format."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7156 char:9
+         $PSGetItemInfo = Microsoft.PowerShell.Utility\New-Object PSCu ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastParseTargetInvocation

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7204 char:9
+         $PSGetItemInfo.PSTypeNames.Insert(0, "Microsoft.PowerShell.Co ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
RepeatDaily

comment created time in 2 hours

startedPowerShell/PSPrivateGallery

started time in 2 hours

issue closedPowerShell/vscode-powershell

Extension needs tremendous RAM

Issue Type: <b>Bug</b>

I openend different *.ps1 files, but only in read mode. No script was started and after some time the extension suddenly needed a lot of RAM. Visual Code was installed on Server 2016 and is a device installation (no user setup). This behavior has not been observed in the past.

Extension version: 2019.5.0 VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z) OS version: Windows_NT x64 10.0.14393

<details> <summary>System Info</summary>

Item Value
CPUs Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz (8 x 2600)
GPU Status 2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>oop_rasterization: unavailable_off<br>protected_video_decode: unavailable_off<br>rasterization: unavailable_off<br>skia_deferred_display_list: disabled_off<br>skia_renderer: disabled_off<br>surface_synchronization: enabled_on<br>video_decode: enabled<br>viz_display_compositor: disabled_off<br>webgl: enabled_readback<br>webgl2: enabled_readback
Load (avg) undefined
Memory (System) 24.00GB (12.06GB free)
Process Argv
Screen Reader no
VM 50%

</details> <!-- generated by issue reporter -->

closed time in 2 hours

pilgi3

issue commentPowerShell/vscode-powershell

Extension needs tremendous RAM

Duplicate of https://github.com/PowerShell/vscode-powershell/issues/1552.

This happens for a couple of reasons. One is because of the extension trying to resolve references in your ps1 files. To work where references come from, we must resolve file paths and modules and use PowerShell to do so. Another cause is PSScriptAnalyzer diagnosing and formatting, which again performs module look ups to determine things like aliases.

We're doing some work in the extension currently that we hope will pay off in terms of improved performance here.

You might experience some improvement by turning off CodeLens, which should be covered in the linked issue.

pilgi3

comment created time in 2 hours

pull request commentPowerShell/PowerShell

New `New-PSBreakpoint` cmdlet & new `-Breakpoint` parameter for `Debug-Runspace`

@PaulHigin What?!?

That is a horrible suggestion. Seriously, just horrible.

I'm just a contributor here, but I've put a lot of time into this. I've pushed another PR on the side because I felt getting this corrected (the design of this functionality and the issues in its implementation) were more important than finishing up tests on this work.

Now you want to put all of that work on hold when I'm just about to submit a PR, slam on the brakes, and push it through the terribly slow RFC process, where I have many, many RFCs that just are not progressing, throwing my efforts to get some of these things corrected and into PowerShell 7 out the door completely? Thanks but no thanks.

The original work @TylerLeonhardt did skipped the RFC process, and was merged. Now here we are with me having finished my dev work, but I found a bug that should be looked at, so I reached out because I can't make assumptions about why the existing implementation is there, and I don't have the luxury of being on your team to talk directly to you about this, so I ask questions here. I know that interrupts your other work. I'm trying to help you guys, and PowerShell as a whole (the product and the community). You're making it really hard for me to do that.

cc: @SteveL-MSFT

TylerLeonhardt

comment created time in 2 hours

startedPowerShell/PowerShell

started time in 2 hours

pull request commentPowerShell/PowerShell

Add support to ternary operator

@daxian-dbw That's my take as well. I at least wanted to capture it so that if this moves forward with implicit continuance (I hope it does), the obscure break would be known/documented.

daxian-dbw

comment created time in 2 hours

pull request commentPowerShell/PowerShell

New `New-PSBreakpoint` cmdlet & new `-Breakpoint` parameter for `Debug-Runspace`

It feels to me that this work is getting out of hand. I think we need to take a step back and be more clear about what debugging changes need to be made, the scope and motivation of those changes. The best way to do this is via RFC and design documents.

Let's start with an RFC and a short summary of what we want to achieve along with scenarios we want to support. Remote and job debugging support may be a separate effort.

cc: SteveL-MSFT, @TylerLeonhardt

TylerLeonhardt

comment created time in 2 hours

pull request commentPowerShell/PowerShell

Add support to ternary operator

@KirkMunro Good catch. The continuation of ? will break ? -InputObject $c Count -gt 0 in that case, so it will be a potential breaking change. Personally, I'm not too worried about it. That's a very obscure use of Where-Object and I presume the possibility of actually break any scripts is very low. But we do need the committee review to approve this.

daxian-dbw

comment created time in 2 hours

startedPowerShell/PowerShell

started time in 2 hours

issue commentPowerShell/PowerShell

ConvertFrom-Yaml, ConvertTo-Yaml

I see only one YAML :( image

Pester, yeh. Too heavy to ship BDD framework into mainline, unlike YAML reader for my pwsh container applications.

DarwinJS

comment created time in 2 hours

issue commentPowerShell/vscode-powershell

Never ending "Formatting Powershell document ..."

@rjmholt has been doing a ton of work on PSScriptAnalyzer’s formatter performance. Naturally, the vscode extension takes advantage of that perf bump. It’s coming soon! Thanks for your patience.

artisticcheese

comment created time in 2 hours

issue commentPowerShell/PowerShell

ConvertFrom-Yaml, ConvertTo-Yaml

@dzmitry-lahoda Issue #5681 proposed to have a rich' version of PowerShell that ships with a set of common modules such as e.g.Pester`, etc. Please post in this issue but given that there seems to be no clear winner between the currently 2 available yaml modules and they are clobbering each other, it might be a hard decision to pick a favourite.

DarwinJS

comment created time in 2 hours

issue commentPowerShell/PowerShell

Consider introducing $IsUnix as an abstraction over $IsMacOS and $IsLinux

After having read the thread again it seems there is still no conclusion. @SteveL-MSFT Should we therefore take the Commitee-Reviewed tag off?

mklement0

comment created time in 3 hours

Pull request review commentPowerShell/PowerShell

Format-Hex: Improve mixed-collection piped input and piped streams of input

 public sealed class FormatHex : PSCmdlet     {         private const int BUFFERSIZE = 16; +        /// <summary>+        /// For cases where a homogenous collection of bytes or other items are directly piped in, we collect all the+        /// bytes in a List&lt;byte&gt; and then output the formatted result all at once in EndProcessing().

@rkeithhill Format-Hex is displaying the hex bytes as they are for these values -- the bytes and the order they're in is coming directly from the CLR, it's not re-ordering them. You can see the code as it already stands in the master branch here, it was @lzybkr's concept that @iSazonov implemented a few months(?) ago now.

Apologies for not really being clear. As a brief example, when I say output would be "grouped" vs "by item", this is what I mean:

Grouped

                       00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000000000000000   01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00  ................
00000000000000000010   05 00 00 00 06 00 00 00                          ........

By item

                       00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000000000000000   01 00 00 00                                      ....
----------------------------------------------------------------------------
00000000000000000000   02 00 00 00                                      ....
----------------------------------------------------------------------------
00000000000000000000   03 00 00 00                                      ....
----------------------------------------------------------------------------
00000000000000000000   04 00 00 00                                      ....
----------------------------------------------------------------------------
00000000000000000000   05 00 00 00                                      ....
----------------------------------------------------------------------------
00000000000000000000   06 00 00 00                                      ....
vexx32

comment created time in 3 hours

issue closedPowerShell/PSReadLine

Some glyphs are not rendered correctly on a PowerShell prompt

Environment data

PS version: 5.1.18362.145
PSReadline version: 2.0.0-beta2
os: 10.0.18362.239 (WinBuild.160101.0800)
PS file version: 10.0.18362.239 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 3000

But I'm seeing the issue since build 17763

I had reported it using the Feedback-Hub ages ago and more recently against the new Windows Terminal (https://github.com/microsoft/terminal/issues/1958) and was redirected here.

Steps to reproduce or exception report

Open a PowerShell and type 123¹²³ on the prompt (or paste it)

The output on the prompt will render as if I had typed 1231²3. However in error messages, everything is rendered correctly.

image

closed time in 3 hours

Tragetaschen

issue commentPowerShell/PSReadLine

Some glyphs are not rendered correctly on a PowerShell prompt

The PSReadLine module is also released to PowerShell Gallery, see the latest version here: https://www.powershellgallery.com/packages/PSReadLine/2.0.0-beta4 You can install the latest beta4 pre-release and give it a try.

I will close the issue as Fixed. Feel free to re-open if you still see it with the beta4 version PSReadLine.

Tragetaschen

comment created time in 3 hours

issue commentPowerShell/PowerShell

Enable all experimental features in the preview version of PowerShell

This will involve changes to ConsoleHost. As such we should be aware that other hosts will not get this feature - aka PowerShell Editor Services.

It wouldn't necessarily have to be implemented as messages sent directly to the host. I haven't dug into how PSES works, but what other options does it provide for conveying information about experimental features that the PS Team wants feedback on as part of the review process of a preview release?

TylerLeonhardt

comment created time in 3 hours

pull request commentPowerShell/PowerShell

Add tooling section to PR template

If the additions is for MSFT only I have no questions but please add [MSFT only] tags to new cases to inform community.

This doesn’t just apply to MSFT only. This applies to everyone. Again, I’m not asking for implementation, I’m asking for enumeration. And if the user is unsure, they can leave it blank or say they don't believe tooling will be impacted.

why non-breaking changes in PowerShell break the projects? Bad PowerShell API? Gaps in PowerShell tests? until MSFT team adds (optional) CIs for them here we will miss something in the projects.

It’s all by design stuff. Again, look at the examples in the PR. If you make changes to the ConsoleHost, then by-design it will not show up in PowerShell Editor Services host. If you add a new language feature, of course it won’t show up in EditorSyntax (which is a TextMate grammar).

This is not for the sake of PowerShell/PowerShell. This is for the PowerShell ecosystem and it’s something that people should think about if they send a PR to this project.

And once again, this is not asking for implementation. It’s just to get folks to think about other repos that can be affected (directly or not) via changes in this repo.

TylerLeonhardt

comment created time in 3 hours

issue commentPowerShell/PowerShell

ConvertFrom-Yaml, ConvertTo-Yaml

What I do no each new pwsh system? I do Install-Module -Name powershell-yaml.

Mongo, Kubernetes, Istio, Ansible - I use. All these are YAML and I do have YAML templates and transfomations.

DarwinJS

comment created time in 3 hours

issue closedPowerShell/PowerShellGet

Module commands cannot resolve package source

<!-- If this is a bug report, make sure you are able to reproduce it with the latest PowerShellGet module from master branch.

If it's not a bug, please remove the template and elaborate on the issue in your own words. -->

Steps to reproduce

  1. Install PowerShell 6.2.1 via MSI
  2. Open PowerShell 6 terminal
Install-Module -Name Az -AllowClobber

Expected behavior

Package is installed

Actual behavior

WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2/'.
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Az'. Try Get-PSRepository to see all available registered module repositories.
At C:\program files\powershell\6\Modules\PowerShellGet\PSModule.psm1:9508 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Environment data

<!-- If relevant to your issue, please paste output from the following commands -->

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
> Get-Module -ListAvailable PowerShellGet,PackageManagement

    Directory: C:\program files\powershell\6\Modules

ModuleType Version    Name                                PSEdition ExportedCommands
---------- -------    ----                                --------- ----------------
Script     1.3.2      PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, G…
Script     2.1.3      PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find…

> Get-PackageProvider -ListAvailable

Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    3.0.0.1          Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, …
PowerShellGet            2.1.3.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, In…

Also, I tried importing the latest PowerShellGet but got another error:

PS C:\repos\PowerShellGet> import-module src\PowerShellGet
import-module : The specified module 'src\PowerShellGet' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ import-module src\PowerShellGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ResourceUnavailable: (src\PowerShellGet:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\repos\PowerShellGet> ls src\PowerShellGet


    Directory: C:\repos\PowerShellGet\src\PowerShellGet

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----         6/12/2019 10:36 AM                private
d-----         6/12/2019 10:36 AM                public
-a----         6/12/2019 10:36 AM          12308 PowerShellGet.psd1
-a----         6/12/2019 10:36 AM           9366 PSGet.Format.ps1xml
-a----         6/12/2019 10:36 AM          46217 PSGet.Resource.psd1
-a----         6/12/2019 10:36 AM           1162 PSModule.psm1

And I don't think it is a proxy issue as discussed here.

<details>

PS C:\WINDOWS\system32> Invoke-WebRequest https://www.powershellgallery.com/api/v2/

StatusCode        : 200
StatusDescription : OK
Content           : <?xml version="1.0" encoding="utf-8"?><service xml:base="https://www.powershellgallery.com/api/v2"
                    xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom"><workspace><atom:title
                    ty…
RawContent        : HTTP/1.1 200 OK
                    Cache-Control: no-cache
                    Pragma: no-cache
                    Server: Microsoft-IIS/10.0
                    X-CorrelationId: 80000099-0003-c100-b63f-84710c7967bb
                    DataServiceVersion: 3.0
                    Content-Security-Policy: frame-a…
Headers           : {[Cache-Control, System.String[]], [Pragma, System.String[]], [Server, System.String[]],
                    [X-CorrelationId, System.String[]]…}
Images            : {}
InputFields       : {}
Links             : {}
RawContentLength  : 338
RelationLink      : {}


PS C:\WINDOWS\system32> Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Trusted              https://www.powershellgallery.com/api/v2/

PS C:\WINDOWS\system32> Invoke-WebRequest -Uri https://www.powershellgallery.com/api/v2 -SslProtocol Tls

StatusCode        : 200

PS C:\WINDOWS\system32> Invoke-WebRequest -Uri https://www.powershellgallery.com/api/v2 -SslProtocol Tls11

StatusCode        : 200

PS C:\WINDOWS\system32> Invoke-WebRequest -Uri https://www.powershellgallery.com/api/v2 -SslProtocol Tls12

StatusCode        : 200

PS C:\repos\PowerShellGet> nslookup powershellgallery.com
Server:  dns_anycast1.ent.lolcentral.com
Address:  172.21.18.130

Non-authoritative answer:
Name:    powershellgallery.com
Addresses:  13.77.161.179
          40.113.200.201
          40.76.4.15
          40.112.72.205
          104.215.148.63

</details>

closed time in 3 hours

MisinformedDNA

issue commentPowerShell/PowerShellGet

Module commands cannot resolve package source

Thanks @SydneyhSmith. That fixed it.

MisinformedDNA

comment created time in 3 hours

Pull request review commentPowerShell/PowerShell

Format-Hex: Improve mixed-collection piped input and piped streams of input

 public sealed class FormatHex : PSCmdlet     {         private const int BUFFERSIZE = 16; +        /// <summary>+        /// For cases where a homogenous collection of bytes or other items are directly piped in, we collect all the+        /// bytes in a List&lt;byte&gt; and then output the formatted result all at once in EndProcessing().

I think 16-bit, 32-bit and 64-bit values make a lot of sense to be grouped together (primarily because of Intel's little endianness. For instance, this E0464545 is easier to read (and reflects the actual hex value) than 45 46 46 E0.

vexx32

comment created time in 3 hours

fork tuchang/openssh-portable

Portable OpenSSH, all Win32-OpenSSH releases and wiki are managed at https://github.com/powershell/Win32-OpenSSH

fork in 3 hours

startedPowerShell/openssh-portable

started time in 3 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

I am trying suppress reboot as we speak, thanks

cosmos500

comment created time in 3 hours

issue commentPowerShell/PowerShell

Enable all experimental features in the preview version of PowerShell

it may be useful to show some information about experimental features on startup in preview builds

This will involve changes to ConsoleHost. As such we should be aware that other hosts will not get this feature - aka PowerShell Editor Services.

TylerLeonhardt

comment created time in 3 hours

startedPowerShell/PowerShell

started time in 3 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

See parameters here: https://github.com/PowerShell/SqlServerDsc#parameters-32

cosmos500

comment created time in 3 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

RebootNodeIfNeeded = $false will make the LCM to never restart.

When the node reboots the configuration will run again, and it will install SSMS on the next run. If you have the Invoke call as the last step (in a Script resource?) then it should run after the reboot (or after the SSMS reboot). If you want to suppress restart in the resource SqlSetup, if you have another way of rebooting, you can use SuppressReboot. Note that the instance might not be available until after reboot.

cosmos500

comment created time in 3 hours

startedPowerShell/PowerShell

started time in 3 hours

issue commentPowerShell/vscode-powershell

Never ending "Formatting Powershell document ..."

Still having this issue on VSCode 1.36.1 on Win10. Anybody figured it out yet?

artisticcheese

comment created time in 3 hours

Pull request review commentPowerShell/PowerShell

Format-Hex: Improve mixed-collection piped input and piped streams of input

 public sealed class FormatHex : PSCmdlet     {         private const int BUFFERSIZE = 16; +        /// <summary>+        /// For cases where a homogenous collection of bytes or other items are directly piped in, we collect all the+        /// bytes in a List&lt;byte&gt; and then output the formatted result all at once in EndProcessing().

Chars I'd agree with, but most other primitives don't seem to make a lot of sense to be grouped.

I'll scrape together some output samples shortly so we can see what having them all grouped into a single block would look like. 🙂

vexx32

comment created time in 3 hours

startedPowerShell/PowerShell

started time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

the main reason i ask is because i have this piece of code at the end and now that the reboot happens to soon this code does not work because ssms is not installed.

cosmos500

comment created time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

what if i set RebootNodeIfNeeded = $false

cosmos500

comment created time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

the strange thing is i did not make any code changes and the reboot changed to before the ssms install. It was doing it after the ssms install before

cosmos500

comment created time in 4 hours

startedPowerShell/vscode-powershell

started time in 4 hours

issue commentPowerShell/vscode-powershell

Accept multiple suggested corrections from PSScriptAnalyzer

Okay, so below I have created a diagnostic record using invoke-scriptanalyzer: Line : 34 Column : 5 Message : Test Extent : return "hello" RuleName : AvoidUsingReturn Severity : Warning ScriptName : TestScript.ps1 ScriptPath : C:\temp\TestScript.ps1 RuleSuppressionID : SuggestedCorrections : {Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent, Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent}

The suggested corrections property contains two CorrectionExtents (as below): File : AvoidJSUsingReturn Description : Apply Fix: Remove the use of "return" StartLineNumber : 34 StartColumnNumber : 5 EndLineNumber : 34 EndColumnNumber : 19 Text : "test" Lines : {"hello"} Start : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position End : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position

File : AvoidJSUsingReturn Description : Test StartLineNumber : 34 StartColumnNumber : 5 EndLineNumber : 34 EndColumnNumber : 19 Text : "hello" Lines : {"hello"} Start : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position End : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position

Rather than showing all of the suggested corrections, VSCode seems to show the last: image

mcgurdan

comment created time in 4 hours

issue openedPowerShell/Win32-OpenSSH

openssh can't keep the child processes running, once the parent process ends

Please answer the following

"OpenSSH for Windows" version 8.0.0.0 beta

Server OperatingSystem Windows Server 2012 Standard

Client OperatingSystem SUSE Linux Enterprise Server 12

What is failing command: ssh windows-host "perl.exe script123.pl"

I am calling multiple scripts inside script123.pl, which in turns creating a tree of child process under parent process. But the problem I am facing with OpenSSH is, when parent process gets completed, it terminates the session and kills the child processes along.

Expected output The parent script(parent process) is calling other scripts in background, and it comes out without disturbing the child scripts (child processes). This is the expected behavior, it works with other SSH tools for windows, eg: SSH Tectia .

created time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

This is the code that if returning true, a restart will be triggered.

https://github.com/PowerShell/SqlServerDsc/blob/2d37a930d957d2bbe148d118a5065a2f6f33d29e/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1#L853-L871

cosmos500

comment created time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

Probably file renames, either by the SQL setup or because of something else. https://blogs.technet.microsoft.com/brad_rutkowski/2007/06/27/are-there-pending-operations-waiting-for-a-reboot/

cosmos500

comment created time in 4 hours

issue commentPowerShell/SqlServerDsc

SqlServerDsc rebooting before ssms is installed

VERBOSE: [myserver]: [[SqlSetup]myserver] Setup exited with code '0'. Setup finished successfully. VERBOSE: [myserver]: [[SqlSetup]myserver] Rebooting target node. VERBOSE: [myserver]: [[SqlSetup]myserver] Using path '\isd-p-pws-v01\SQL2016Dev\setup.exe'. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Database Engine feature. VERBOSE: [myserver]: [[SqlSetup]myserver] Database Engine feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_Servi ce WHERE Name = 'MSSQLSERVER','queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: [myserver]: [[SqlSetup]myserver] Operation 'Query CimInstances' complete. VERBOSE: [myserver]: [[SqlSetup]myserver] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_Servi ce WHERE Name = 'SQLSERVERAGENT','queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: [myserver]: [[SqlSetup]myserver] Operation 'Query CimInstances' complete. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting replication feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\ConfigurationSt ate). VERBOSE: [myserver]: [[SqlSetup]myserver] Replication feature not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Data Services Client feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\DQ*). VERBOSE: [myserver]: [[SqlSetup]myserver] Data Quality Services feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Data Quality Client feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\ConfigurationState). VERBOSE: [myserver]: [[SqlSetup]myserver] Data Quality Client feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Information: PowerShell module SqlServer not found, trying to use older SQLPS module. VERBOSE: [myserver]: [[SqlSetup]myserver] Importing PowerShell module 'SQLPS' with version '1.0' from path 'M:\Program Files (x86)\Microsoft SQL Server\13 0\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1'. VERBOSE: [myserver]: [[SqlSetup]myserver] Connected to SQL instance 'myserver'. VERBOSE: [myserver]: [[SqlSetup]myserver] Clustered instance not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Full-text feature. VERBOSE: [myserver]: [[SqlSetup]myserver] Full-text feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_Servi ce WHERE Name = 'MSSQLFDLauncher','queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: [myserver]: [[SqlSetup]myserver] Operation 'Query CimInstances' complete. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Reporting Services feature. VERBOSE: [myserver]: [[SqlSetup]myserver] Reporting Services feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_Servi ce WHERE Name = 'ReportServer','queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: [myserver]: [[SqlSetup]myserver] Operation 'Query CimInstances' complete. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Analysis Services feature. VERBOSE: [myserver]: [[SqlSetup]myserver] Analysis Services feature not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Integration Services feature. VERBOSE: [myserver]: [[SqlSetup]myserver] Integration Services feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_Servi ce WHERE Name = 'MsDtsServer130','queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: [myserver]: [[SqlSetup]myserver] Operation 'Query CimInstances' complete. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Documentation Components feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\ConfigurationState ). VERBOSE: [myserver]: [[SqlSetup]myserver] Documentation Components feature not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Client Connectivity Tools feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\Tools\Setup\Clien t_Components_Full). VERBOSE: [myserver]: [[SqlSetup]myserver] Client Connectivity Tools feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Client Connectivity Backwards Compatibility Tools feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Serv er\130\Tools\Setup\Client_Components_Full). VERBOSE: [myserver]: [[SqlSetup]myserver] Client Connectivity Backwards Compatibility Tools feature detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Client Tools SDK feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\Tools\Setup\Client_Compone nts_Full). VERBOSE: [myserver]: [[SqlSetup]myserver] Client Tools SDK feature not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Detecting Master Data Services (MDS) feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\130\ConfigurationSta te). VERBOSE: [myserver]: [[SqlSetup]myserver] Master Data Services (MDS) feature not detected. VERBOSE: [myserver]: [[SqlSetup]myserver] Found features already installed: SQLENGINE,DQ,DQC,FULLTEXT,RS,IS,CONN,BC VERBOSE: [myserver]: LCM: [ End Set ] [[SqlSetup]myserver] in 1188.7010 seconds. VERBOSE: [myserver]: LCM: [ End Resource ] [[SqlSetup]myserver] VERBOSE: [myserver]: [] A reboot is scheduled to progress further. Configuration will be continued after the reboot.

WARNING: [myserver]: [] A reboot is scheduled to progress further. Configuration will be continued after the reboot. VERBOSE: [myserver]: LCM: [ End Set ] VERBOSE: [myserver]: LCM: [ End Set ] in 1199.2370 seconds. VERBOSE: Operation 'Invoke CimMethod' complete. VERBOSE: Time taken for configuration job to complete is 1199.356 seconds

cosmos500

comment created time in 4 hours

issue openedPowerShell/SqlServerDsc

SqlServerDsc.Common: Invoke-Query silently runs queries even with Verbose

I suggest we add verbose messages to Invoke-Query so that when called with -Verbose it outputs the query run, and if it will return results or not.

created time in 5 hours

startedPowerShell/PowerShell

started time in 5 hours

startedPowerShell/PowerShellGallery

started time in 5 hours

startedPowerShell/PowerShell

started time in 5 hours

startedPowerShell/PowerShell

started time in 6 hours

startedPowerShell/PowerShell

started time in 6 hours

issue closedPowerShell/PowerShell

">" creates files, even on terminating errors

<!--

For Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead: Windows PowerShell UserVoice

This repository is ONLY for PowerShell Core 6 issues.

-->

">" (but not | out-file) creates files, even when the command has a terminating error. (I was helping a newbie with > vs -gt.)

Steps to reproduce


PS /Users/js> try { 1 | Where $_ > 1  } catch { 'yes' } 

PS /Users/js> get-item 1

Expected behavior

yes

get-item : Cannot find path '/Users/js/1' because it does not exist.
At line:1 char:1
+ get-item 1
+ ~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (/Users/js/1:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
 

Actual behavior

yes                           

    Directory: /Users/js

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-----           7/14/2019  7:01 PM              0 1

Environment data

<!-- provide the output of $PSVersionTable -->

Name                           Value
----                           -----
PSVersion                      6.2.0
PSEdition                      Core
GitCommitId                    6.2.0
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 21 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

closed time in 6 hours

jszabo98

issue closedPowerShell/PowerShell

Extremely high memory usage

Steps to reproduce

Run pwsh.exe

Expected behavior

The shell should open quickly and use very little memory.

Actual behavior

The shell opens, doesn't get to the prompt very quickly, then once running each pwsh.exe process uses rougly 250Mb of RAM (!!!)
For daily use this is not acceptable when compared to my typical shell workflow.

Environment data

<!-- provide the output of $PSVersionTable -->

Loading personal and system profiles took 2136ms.
PS C:\projects> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

closed time in 6 hours

photex

issue closedPowerShell/PowerShell

git help is broken in 7.0.0-preview.1

Steps to reproduce

git help log

Expected behavior

Would show git help on the specified command in a browser window.

Actual behavior

Print this error instead:

/bin/bash: C:/Program Files/Git/usr/bin/start: No such file or directory

The same command works fine from 5.1 or cmd on the same machine. So it is related to PS 7 preview.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.1
PSEdition                      Core
GitCommitId                    7.0.0-preview.1
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

closed time in 6 hours

FallenGameR

issue closedPowerShell/PowerShell

Cmdlet "New-Mailbox" cannot use -encoding UTF-8

While the UI for ExchangeOnline and Office365 can use UTF-8 when creating new resources, the Powershell cmdlet cannot.

closed time in 6 hours

Arkpit

issue commentPowerShell/PowerShell

git help is broken in 7.0.0-preview.1

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

FallenGameR

comment created time in 6 hours

issue commentPowerShell/PowerShell

">" creates files, even on terminating errors

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

jszabo98

comment created time in 6 hours

issue commentPowerShell/PowerShell

Extremely high memory usage

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

photex

comment created time in 6 hours

issue commentPowerShell/PowerShell

Cmdlet "New-Mailbox" cannot use -encoding UTF-8

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Arkpit

comment created time in 6 hours

issue commentPowerShell/vscode-powershell

Error: The scope number '7' exceeds the number of active scopes. Parameter name: ScopeID

I'm gonna quote a comment I wrote awhile ago about this:

That error is expected when debugging a script where a frame in the call stack is within a module. The number of scopes iterated when getting variables is based on the number of frames in the call stack. But because each SessionState has it's own stack of SessionStateScopes, so the amount of scopes does not equal the amount of frames in a call stack.

A possible fix would be to check the module of the command listed in the scope with frame.InvocationInfo.MyCommand.Module, but invoking Get-Variable in a different session state than the current EngineSessionState is tricky. If the session state belongs to a module we could do . $module { Get-Variable -Scope x }, but there's no publicly accessible way to get the top level session state. Even if we could get the top level session state, the only way to invoke a script within that session state is to create a fake module object and set it's session state.

$fakeModule = [psmoduleinfo]::new($false)
$fakeModule.SessionState = $topLevelSessionState
. $fakeModule { Get-Variable -Scope x }

But that's probably not intended behavior and is likely as dangerous as reflection.

All that said, this error is caught and wouldn't cause any crashes, we just don't get as much info for each frame as we'd like.

The issue is more complicated than it appears, and is mostly due to limitations in the engine. The fix I proposed (if it would even work) would be pretty time consuming to write. I typically only advise $Error to be used for interactive troubleshooting as it's very inconsistent. Modules can write to it, but not read it, event subscribers as well. Breakpoint actions can also pollute the error list.

You can get similar functionality from the -ErrorVariable common parameter. That will be the same type of list, but it will be limited to the errors generated within the command you use it on.

That's not to say that there is nothing to fix here, just that it's not particularly easy to fix with the PowerShell API's we have today.

DarkLite1

comment created time in 6 hours

startedPowerShell/vscode-powershell

started time in 6 hours

issue commentPowerShell/vscode-powershell

Extension needs tremendous RAM

taskmgr

pilgi3

comment created time in 6 hours

more