powershell-v5.1 Questions

5

Solved

I just started to learn PowerShell from the Microsoft virtual academy and I was running one of the commands indicated. while on their end it worked mine did not. I did look around for a solution to...
Larhondalari asked 10/10, 2018 at 22:4

4

My Powershell v5.1 won't install almost any module automatically using install-module whereas manually installation does work. First, when I run install-module, it would download the module then t...
Lurlenelurline asked 13/1, 2019 at 0:22

4

Solved

I am trying to output variables using Write-Output, but it did not work inside a PowerShell class method. Write-Host is working. See the sample code below. class sample { [string] sampleMethod() ...
Rusert asked 11/10, 2018 at 10:19

4

I am currently in Powershell V5.1 and would like to bypass Internet Explorer proxy on a Invoke-RestMethod command. In Powershell V6, there is the -NoProxy option that indicates that the cmdlet wil...
Burgh asked 24/11, 2018 at 23:41

1

Solved

I've been getting an error running Invoke-Command where the script block takes a parameter of type dictionary: Cannot process argument transformation on parameter 'dictionary'. Cannot convert t...

1

Solved

I'm using PowerShell 5.1 and I am trying to determine why Write-Information messages do not show in the transcript log created by Start-Transcript unless I set $InformationPreference to SilentlyCon...
Beachlamar asked 15/3, 2019 at 22:40

2

Solved

I was using tab autocompletion for a variable name in Powershell 5.1 today and noticed that one of the choices was the name of a PSDrive. The drive name is docs and I wanted to expand is called $do...
Talyah asked 7/3, 2019 at 1:0

1

As the title says, if I try to add -persist to the cmdlt, it returns an error: New-PSDrive : The network resource type is not correct At line:1 char:1 + New-PSDrive -Name P -Root <redacted> ...

2

Solved

Let's say you have a giant object - one which may or may not have nested arrays / objects, # Assuming 'user1' exists in the current domain $obj = Get-ADUser 'user1' -Properties * and I want to ...
Sonora asked 2/10, 2018 at 19:7

1

Solved

Is there a way to force PowerShell to reload a module when using module .\MyModule.psm1? Normally I would use Import-Module .\MyModule.psm1 -Force but since I am using enum and class C# style this...
Shortlived asked 19/9, 2018 at 20:9
1

© 2022 - 2024 — McMap. All rights reserved.