Questions tagged [powershell]

1 votes
0 replies
How to fix an HRESULT: 0x8150002E Exception
Background: I'm running a $ie = New-Object -ComObject InternetExplorer.Application within Powershell 5.1.17134.590, but getting a "Cre...
asked 1 month ago
-2 votes
1 replies
Powershell outputs CSV data into multiple lines instead of single line
I have a CSV file with data about some users and ids, and i have to add to each entry a mail formed by their name.surname@domain. While it manage...
asked 1 month ago
0 votes
2 replies
extract value between two square braces
I need to extract the value between two square braces from a specific line in a command output. Here's the output of the command. C:\Informatica...
asked 1 month ago
-1 votes
0 replies
Remotly purge msmq private queues
I try to purge msmq queues in remote machine i have following code but it doesn't work in remotely queuename = ".\private$\myprivatequeue"...
asked 1 month ago
0 votes
0 replies
ArgumentList for silent install .Net 4.7.2
Attempting to silently install .Net 4.7.2 on a remote machine using Invoke-Command but no matter what type of parameters I've tried I keep gettin...
0 votes
1 replies
How to move non-temp files to dedicated subdirectories?
I need help building a script that goes through each file in the root of the current directory, comparing their filename.ext against a blacklist...
asked 1 month ago
0 votes
1 replies
How to check if server is up and running or not in IE browser only using Powershell
Checking if server or Url is to open in IE and get the response status code from the url after open in browser. Means need to check server availa...
asked 1 month ago
0 votes
2 replies
Move files not equal to files in stock folder and older than X
I am trying to move files from one folder(source) that are NOT in another folder (stock files) and where source files are older than 30 days to a...
asked 1 month ago
0 votes
1 replies
Distinguish Between Primary and Secondary Nodes in VMWare
I'm writing some powershell to gather data from our vSphere clusters. We have some VMs paired as Windows/SQL failover clusters, and I only want t...
asked 1 month ago
0 votes
1 replies
Powershell chrome.exe force-device-scale-factor does not work
I am trying to open chrome with custom zoom size using powershell using following command & 'C:\Program Files (x86)\Google\Chrome\Applicatio...
asked 1 month ago
-3 votes
0 replies
How to update exchange user add value to attribute1 using C# [closed]
How to update exchange user add value to attribute1 using C#? I want to update user info in Exchange using C# and add value to the attribut1. I...
asked 1 month ago
1 votes
1 replies
Description property dont give back result
I would like to list all of groups without description. I am trying to export a csv with name and description for manage the result list but ther...
asked 1 month ago
0 votes
0 replies
How to import csv replace characters and export csv that is saved in blob in powershell
I am very new to powershell. I am trying to replace characters in a csv that is saved in blob storage. Take the file from one folder, do the repl...
asked 1 month ago
0 votes
1 replies
pipeline calling same powershell function twice, will not recognize first call to function
I have the pipeline below: trigger: - master jobs: - job: BuildDacPac steps: - task: MSBuild@1 displayName: 'Build DACPAC' inputs:...
asked 1 month ago
0 votes
0 replies
Regular Expressions match stand alone character, but do not match if in a word [duplicate]
In C#, I want to use a regular expression to match any of these words: string keywords = "(shoes|shirt|pants)"; I want to find the whole words...
asked 1 month ago
1 votes
3 replies
How to remove all hidden .unwanted directories from a tree?
I want to force remove any hidden directory named .unwanted from a directory tree using powershell. I am hoping for a simple enough solution for...
asked 1 month ago
2 votes
2 replies
Running Get-Service from C# host
Here's a simple C# PowerShell host program which simply runs Get-ChildItem and displays the results on the console: using System.Management.Auto...
asked 1 month ago
-1 votes
2 replies
Counter variable does not increment inside do while loop
I'm learning PowerShell in school and trying to understand why this is not working: $y = 1 do { $count = 1 echo $count Start-Sleep 1...
asked 1 month ago
0 votes
0 replies
How to write powershell script which will execute python ones using specific venv?
I have written some web scraping python scripts, which I want to run regulary on Windows Server. I was ordered to write powershell script which c...
1 votes
2 replies
Add-Member to an object strange behaviour
I try to add a member "canonicalName" to an object. When I use a Statement: $obj | Add-Member NoteProperty "CanonicalName" -value (Get-ADComput...
asked 1 month ago
2 votes
1 replies
How do I rename files in a folder based on specific content in each file using PowerShell?
I need to copy an application's archived files (they are all XML), then rename the files with the Customer ID and Purchase Order Number. To find...
asked 1 month ago
1 votes
1 replies
How to see what process is running behind a port
I love PowerShell. It's my first scripting language and I find myself wanting to know more. As such, I'm interested in setting up a status page t...
asked 1 month ago
0 votes
2 replies
How do you get Windows Powershell to play a sound after .bat job has finished running?
As the title states, I have a .bat job running within powershell that when finished running I would like a sound notification to go off. I was wo...
asked 1 month ago
3 votes
1 replies
Why can't a thread created by PowerShell execute script functions?
I have a script function that calls. net to manipulate word documents. It works. Now I want to create a sub-thread to execute it, and then the ma...
asked 1 month ago
0 votes
0 replies
Power-Shell Get the URL and the permission level the sharepoint group have access to [closed]
I need to get and display the URLs(the groups have access to) and the permission level on these URLs on Power-Shell by using Power-Shell. these...
asked 1 month ago