Skip to main content

Questions tagged [powershell]

PowerShell is a cross-platform command line and scripting utility from Microsoft. Use this tag for questions about writing and executing PowerShell scripts ONLY. Programming questions specific to the cross-platform version PowerShell Core (Windows, macOS, and Linux) should be tagged [powershell-core]. Questions about system administration should be asked on Super User or Server Fault.

powershell
0 votes
0 answers
2 views

Kill process based upon process Id powershell - xaml listview

I have a xaml listview with a button. The listview shows all processes that have powershell* or pwsh* in them. I want to be able to kill any of the processes by clicking a button but so far nothing I'...
Matt Williamson's user avatar
0 votes
0 answers
3 views

WIX How to execute custom action that runs installed file with admin priveleges

In a Windows Installer msi package, created with WIX, I want to execute a custom action (written in c#) that executes a powershell script file that is installed by the installer. The script needs ...
R. Beiboer's user avatar
1 vote
0 answers
14 views

Windows 10 PowerShell: allow service interact with desktop (non system user)

The problem is: I have remote desktop, I have set up gitlab runner on it. I am running GUI application (with OpenGL) within my gitlab runner service. When I am using System User for gitlab runner my ...
IzaeDA's user avatar
  • 71
0 votes
0 answers
16 views

authentication powershell from Linux Centos 7 to RHEL9 problem

This script powershell work well until Centos 7 $session = New-PSSession -ComputerName $computerName -Credential $credential -Authentication Negotiate where gssntlmssp was installed... Now I need ...
Daniele Grillo's user avatar
0 votes
0 answers
19 views

How to report on a users sign in activity and manager using Get-MgUser

I need to write a PowerShell script to report on a users sign in activity both interactive and non-interactive and include who their line manager is as well. The end goal is to use my app registration ...
Bradley's user avatar
  • 13
0 votes
0 answers
16 views

WIX How to let a script fail the installation

I am using WIX to create a Windows Instaler msi package. One of the files to be installed is a Powershell script that must be executed from the installer to register a scheduled task. When executing ...
R. Beiboer's user avatar
0 votes
1 answer
13 views

compare machine catalog images of a citrix machine

I am trying to compare each ProdImage of ProdMasterImages with UATImage of UATMasterImages and if the image name matches i have to get the respective ProdCatalogNames of that ProdMasterImage. Below is ...
Sai Mounika Chintala's user avatar
0 votes
0 answers
14 views

Start-ThreadJob not executing in ps1 file when executed in System.Management.Automation.PowerShell Class

I have a powershell script that i am executing via System.Management.Automation.Powershell.Invoke. in the script i have Start-ThreadJob... | Wait-Job... Running the script on the command line using ...
user1415322's user avatar
2 votes
2 answers
26 views

PowerShell 7+ parse querystring-style strings into HashTable

I'm trying to avoid the apparent mess that is the .NET Core querystring parsing classes for now, yes. For a given string: $data = 'id=1&name=neil&language=powershell' I'd like to get a ...
Neil Barnwell's user avatar
1 vote
1 answer
29 views

Modify OuterXml of a given node to keep it in file, but render node useless

I'm working on modifying xml files from an existing system using PowerShell. Our system supports using multiple nodes in one body, and depending on what the OuterXML is set as, it will bypass that ...
k1dfr0std's user avatar
  • 515
0 votes
1 answer
25 views

How can i put a date string in the body of a web request using Powershell?

I have a body of a web request in powershell like the following $body = "timePeriod":{"from":"2024-07-01T00:00:00+00:00","to":"2024-07-31T23:59:59+00:00&...
Jenny's user avatar
  • 11
0 votes
0 answers
18 views

Keep message boxes on top an in active screen

I have a script which, at its start, creates several dialog boxes to ask for input data. First a message appears "Select target folder". After clicking, a folder browser appears to allow the ...
Petr Synek's user avatar
0 votes
0 answers
33 views

When trying to publish linux function app packages using Publish-AzWebApp powershell command it is not uploading

I tried publishing app multiple times using bellow command on both windows and linux, it was working fine. However, from last few days after migrating function app from dotnet 6 isolated to dotnet 8 ...
Saburi's user avatar
  • 1
0 votes
0 answers
18 views

How to assign bulk policy definition to management group level using powershell script

Below is the code for bulk policy definition deploy. required powershell code for bulk policy assignment to these policy definitions. #Read all definitions If ($PSCmdlet.ParameterSetName -eq '...
Arun Vijay's user avatar
-1 votes
0 answers
36 views

Rename a file based on value present in the name value in the content

I have a XML file as below and the file name is "data.xml" <ns0:LovData xmlns:ns0="http://teamcenter.com/Schemas/Soa/2011-06/MetaModel"> <ns0:lovs name="infolist"...
Swamy's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
7870