About 50 results
Open links in new tab
  1. What are the different PowerShell file types? - Stack Overflow

    Jun 27, 2020 · .ps1 files are PowerShell scripts; it is the most common type of PowerShell file and one that is the most like other shell scripts like .sh, .bat files .psm1 files are PowerShell modules; these …

  2. powershell - extract file name and extension - Stack Overflow

    Mar 20, 2012 · 145 I need to extract file name and extension from e.g. my.file.xlsx. I don't know the name of file or extension and there may be more dots in the name, so I need to search the string …

  3. windows - File extension for PowerShell 3 - Stack Overflow

    Aug 24, 2012 · All of us probably know .bat for Batch files. But what is the file extension for PowerShell 3 scripts? I found .ps1 and some other endings but they're only for version 1.

  4. Removing path and extension from filename in PowerShell

    Sep 20, 2012 · When Get-Item, Get-ChildItem, or their aliases ls, dir, gi, gci are used, the file from the tested string must exist. When we are checking a series of string and not iterating through a …

  5. Powershell script not firing from batch file - Stack Overflow

    Feb 23, 2017 · To run a script file from the command line, use the -file parameter of powershell.exe.

  6. How can I associate a file type with a powershell script?

    Jan 16, 2018 · Woo I opened somefile I would like to associate my-script.ps1 with a particular file type. I am attempting to do this via 'Open With' However: Windows doesn't include Powershell scripts as …

  7. replace - Powershell change extension - Stack Overflow

    I have a problem with change extension of a file. I need to write a script which is replicating data, but data have two files. Filename is not a string, so we can't use normal -replace I need to get

  8. Use .pwsh instead of .ps1 extension for PowerShell Core scripts?

    Aug 29, 2019 · From the documentation: -PSEdition <PSEdition-Name> Specifies a PowerShell edition that the script requires. Valid values are Core for PowerShell Core and Desktop for Windows …

  9. Using PowerShell to remove file extension - Stack Overflow

    Apr 29, 2024 · 0 I'm trying to clean up some folders in Windows that have dozens of text files with a double .txt extension. (file1.txt.txt) I thought the PowerShell script below would work, but it's giving …

  10. How to use PowerShell to switch default app (from pre-determined list ...

    May 9, 2023 · I frequently switch App to open PDFs and wish for shortcut. Without Admin Right, can PowerShell Script change default App from pre-determined list: Open PowerShell Window Show …