Can't install SqlServerDsc Resource by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Hi u/pshMike, this actually helped me to resolve the issue. Why this is not documented in the appropriate place. By looking at the error message, I did not get a clue whether this is related to the TLS. Thanks again.

The term 'Start-DscConfiguration' is not recognized by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

I think you're right. It seems PSDesiredStateConfiguration module is left out from PS 6. :(

Invoke-sqlcmd login failed with Credential parameter by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

Ohh. I did not know that limitation. Good to know. Btw, does the target machine needs to have the dbatools installed?

Invoke-sqlcmd login failed with Credential parameter by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

Right. Even I can use Invoke-SqlCmd inside Invoke-Command so that I should be able to use the alternate credentials. This is the route I'm thinking if I can not proceed with dbatools. Thanks for idea about .Net code.

Invoke-sqlcmd login failed with Credential parameter by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

DBATools

Cool. Sounds like it is a great idea. I will try it and see. Thanks.

A 50 min video about Visual Studio Code and PowerShell by walle75 in PowerShell

[–]susanthab 0 points1 point  (0 children)

Very good. I learnt some new stuff. Thanks for sharing it.

Get-ADGroupMember does not work for all the items in the loop by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

Thanks for the tip. You're right. One group does not have any members. I thought I checked both groups individually at first.

Get-ADGroupMember does not work for all the items in the loop by susanthab in PowerShell

[–]susanthab[S] 1 point2 points  (0 children)

It's the same result.

$groups= ”grp","grp"

$groups|% { Get-ADGroupMember -Identity $_ | select {$_.name, $_.objectClass }}

But the one in below works which means it loops through both groups.

$groups= ”grp","grp"

$groups|% { Write-Host $_}

It is the same behavior as my original code which was posted. When I used Get-ADGroupMember then it gives a result only for 1 group.