119,149 questions
Advice
0
votes
3
replies
66
views
Accept pipeline input: False
I run Powershell PSVersion: 5.1.26100.8457; PSEdition: Desktop; BuildVersion: 10.0.26100.8457. I'm a learner of PowerShell and try to understand the pipeline input of cmdlets.
The help files of all ...
0
votes
0
answers
75
views
[regex]::match return a result, but not an index, on a VERY simple regex. Why? [closed]
With the relevant part of the variable:
$Details = "Requested Item
Number"
and this code:
$DetailStartPositionMatches = [regex]::match($Details,"Requested\ Item\s+Number")
write-...
Advice
0
votes
2
replies
59
views
How to exit on a found string for aws logs tail
I have made a customized deployment pipeline, for a legacy ASP.net web forms app, where I utilize Web deploy + S3 and SQS Services from Amazon.
I have written a script in Powershell that moves the ...
Tooling
0
votes
2
replies
85
views
I get an error everytime I close a powershell on codex
I get an error everytime I close a powershell on codex, I don't know why, I reinstalled codex but the error is still there. If you know what is the problem pls leave a comment.
-2
votes
1
answer
130
views
How do I install a printer with an EXE generated by Inno Setup?
I'm trying to use Inno Setup to create an installer to install printers. All the code to install the drivers, the printer port and the printer is in a PowerShell script.
Basically, I have a folder ...
2
votes
1
answer
77
views
Building Robocopy Arguments Including /XF Using Arrays or Variables in PowerShell [duplicate]
I'm working on a PowerShell script that culminates in RoboCopy with various arguments. I want to be able to break out the arguments that will be passed to RoboCopy to make it easier to manage and ...
2
votes
0
answers
108
views
How can a MECM app be cloned with Powershell?
I'm trying to clone a MECM app with Powershell, the same way you can do so in the GUI when you right click on the app and click copy, which MECM then clones the app and places it in the same directory ...
Advice
0
votes
4
replies
151
views
Need a recommendation for PowerShell
I want to learn how to work with PowerShell and other utilities related to it, like LGPO and others, is there perhaps some quality documentation? although I am a fan of the video format, it would be ...
-1
votes
1
answer
122
views
How to debug a .psm1 module? [closed]
I have some functions defined in Module.psm1 file.
Script.ps1 script imports it and call those functions.
The functions are not in Script.ps1 because I'm using ForEach-Object - Parallel. With the ...
1
vote
0
answers
67
views
Sporadic failure of PowerShell runs after update to 4.268.0 "An error occurred while creating the pipeline"
We updated our agents from 3.238 to 4.268 mid february. Exactly one week later, multiple pipelines started receiving the following error:
========================== Starting Command Output ============...
Advice
3
votes
11
replies
245
views
get or set nonexistent properties of Powershell object
In Powershell, if I create a Hashtable I can get/set values via pseudo properties
$h = @{ }
$h.a
# returns $null
# add a key/value with key 'a'
$h.a = 'abc'
$h.a
# returns 'abc'
This is not limited ...
3
votes
3
answers
129
views
Disable all links for a specific GPO
I need to disable all Links for a specific GPO using PowerShell.
I know the simple command would be
Set-GPLink -Name $gpoName -Target $targetPath -LinkEnabled No
and that would work if I wanted to do ...
-1
votes
0
answers
69
views
Do Azure runbooks have SQL Server TDS access?
I am trying to run SQL queries against an Azure managed instance from a Powershell script in an Azure automation account runbook. And I'm getting an "unable to connect" error that looks like ...
0
votes
0
answers
87
views
How to get task scheduler to run in the early hours? [migrated]
I've built a Windows task that I want to run in the hours between midnight and 6 AM. It has not yet run in those hours. On occasion it will run at later hours, but not always. The scheduled powershell ...
-5
votes
0
answers
62
views
How do I Pass a Password Variable with NET USE Command in Powershell [duplicate]
I am unable to have a password variable in net use command to work however if I a use a plain text password it works.
What changes do I need to make. Any help would be much appreciated.
#Authenitcate ...
