# Tag Info

### Cannot reinstall Calculator: Microsoft.UI.Xaml.2.0 missing

For anyone looking for the command in 2022 to install to all users. Follow KreonZZ's steps then install in PowerShell with this: DISM.EXE /Online /add-ProvisionedAppxPackage /PackagePath:.\Microsoft....
1 vote
Accepted

### Windows Connection to Local Computers is Slow by Name but Fast by IP Address

Have you tried the host file? Add the following lines to C:\Windows\System32\drivers\etc\hosts: 192.168.0.201 BOB-COMPUTER 192.168.0.202 JOE-COMPUTER 192.168.0.209 JOHN-COMPUTER Maybe this won't ...
• 26
1 vote
Accepted

### how to escape the line to run powershell

As per my comment, from your other post, where I provide feedback. This is what I mean. The below will work as shown... @echo off cls :: title cpm color e :: :: cls PowerShell -Command 'Hello from ...
• 3,927

### Is it possible to have scripts run in Windows Terminal by default?

Yes you can. I tried to customise my PowerShell terminal, Developer PowerShell terminal and CMD terminal with ASCII art. The way you can do this is to hack the terminal a little bit. I will give the ...

• 1,734

### Get service name from it's PID (powershell)

Here's another way - those above might be more reliable? $id = 5556 # (debugging) Nice little table to make sure you've got the right thing... Get-Process | Where-Object Id -EQ$id | Select ...
• 140

### How to update PSReadline properly in PowerShell 7.2.5?

All instances of Powershell need to be closed. (Don't forget vscode, windows terminal, etc. which might run one.) You may then remove the folder PSReadline from Program Files using Windows Explorer ...

### how to fill fields of a dialog in ie with powershell?

Typically when accessing a website through basic authentication you can include the username and password inline with the URL like this: http://<username>:<password>@192.168.1.1 Or with ...
• 266

### how to escape the line to run powershell

As you are writing a batch script, you can use the ^ (as you did before editing the question) for line continuation. Remove the " you added at the beginning of the Powershell command. Add the &...
• 13.1k
Accepted

### How can I set the value for each default key in different subdirectories of regedit?

PowerShell: Get-ChildItem Registry::HKCR\mplayerc64.* -Recurse | Where PSChildName -eq 'Shell' | Set-ItemProperty -Name '(Default)' -Value 'enqueue' Aliased: gci Registry::HKCR\mplayerc64.* -s | ?...
• 6,929

### How can I set the value for each default key in different subdirectories of regedit?

Export the Registry key and subkeys as one .reg file, e.g., no_def.reg. Open in the.reg file in a text editor, such as Notepad or Notepad++. Manually, or by search-and-replace, insert `@="enqueue&...
• 20.9k

### Powershell - Find and move files with specific extension while retaining folder structure

This should create the necessary folders if they don't exist: get-childitem "D:\*" -Filter *.mp4 -recurse | ForEach{ $TargetPath =$_.DirectoryName -replace ('^C','A') If (!(Test-...
• 6,929

### Powershell - Find and move files with specific extension while retaining folder structure

You could accomplish this using something like this: get-childitem "D:\*" -Filter *.mp4 -recurse | foreach-object { $source =$_.FullName $target =$Source.Replace("D:\", &...
• 56k
1 vote
Accepted

### PowerShell/CMD command to map metadata from one set of files to another, in different drives

Untested, but I think this would do the trick: $new = 'C:\Users\xxxxx\Desktop\new'$new2 = 'S:\new2' $temp = ( mkdir "$env:tmp\$((Get-Date).Ticks)").FullName$TroubleShoot = @' MetaSource: ...
• 6,929
1 vote

### What is the Windows equivalent of xset command

If you run this in the console: $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") ... and then press any key, you get a return value that you can extrapolate from.$Host.UI.RawUI.ReadKey(&...
• 3,927

• 457

### Installing SSMS in Windows Core

I happened to have a windows server core (2012 R2) VM to test this on. Running this cmd command worked fine. I got a pop-up window with an installation progress bar for each component until it was ...
• 1,977
Accepted

### Parameter cannot be processed because the parameter name 'p' is ambigious

To start, I believe your password is incorrectly formatted and its location should also be changed. The way you have it with the -p kjlz6wm, you are setting the password in Powershell itself. But you ...
• 457
1 vote

### How to determine if a file with a trailing space exists?

I found out the problem isn't Powershell - it's Windows. However, Windows does have a way to force a literal string: prepend \\?\ to a path: For file I/O, the "\\?\" prefix to a path ...
• 69

### How can I open a URL link from within an Excel cell (hyperlink) using a different browser than the default?

This is fairly simple using Powershell and the ImportExcel module: In my example my spreadsheet has three columns, DATE, URL, OTHER_INFO and the URL column has the links. Install the ImportExcel ...
• 457

### Export Excel sheet as CSV, with regional settings

If the $ws variable is already well formed, I suspect you can simplify it by simply exporting it as a CSV and setting the delimiter:$ws | Export-Csv -NoTypeInformation -Delimiter ";" -Path &...
• 457

• 1,977
1 vote
Accepted

### Clear Powershell screen when typing prompt not available

This is not specific to powershell, as it affects anything running in the built-in terminal. Unfortunately, there is no way to do this from that built-in terminal that the .EXE for powershell, cmd, ...
• 1,977

You ask for "output i am expecting(only want headers added)" using your example the following does what you ask. $File = 'O:\Temp\Import.csv'$Data = Get-Content -Path $File$Header = "...
• 1,385

### All of the about_* topics are missing from my PowerShell help. What gives?

It was stupid locale for me. Get-UICulture returns en-GB, but apparently help is only available in en-US, because of course it is. Update-Help -Force -UICulture en-US -Verbose Works fine on 7.2.4 on ...

### How to set default app per filetype programmatically?

Although this post is over 3 years old, the SetUserFTA might help you. See references here and here. It worked for me to programmatically set the default browser in Windows 10 and it should work for ...

Import-CSV only treats literals between double quotes. You need to define them as " " or "John ". So your original CSV file is poorly formatted for your needs. You'll ...
• 850
ScriptMethod: A method that is implemented from a PowerShell Scripts. Example: $A = Get-ChildItem C:\Temp\test.txt$S = {[math]::Round(($this.Length / 1MB), 2)}$A | Add-Member -MemberType ...