Questions tagged [powershell-ise]

PowerShell-ISE refers to Microsoft Windows PowerShell's Integrated Scripting Environment.

PowerShell-ISE refers to Windows PowerShell's Integrated Scripting Environment. The ISE offers the features of the PowerShell console plus script editing and debugging features. ISE is also unicode aware, vs the Console that isn't!

522 questions
14
votes
3 answers

How to add properties to a PowerShell object from an array

I have a two-dimensional array of property names and values, which I need to add to a PowerShell object. I have NO issues creating and displaying an object like this using New-Object and Add-Member: $obj = New-Object PSObject $obj | Add-Member…
grisha
  • 389
  • 1
  • 8
  • 22
14
votes
1 answer

PowerShell script to export a list of file names only with no file extension then output to a text file separate for each directory

I need a PowerShell script to export a list of file names only with no file extension then output to a text file separate for each sub-folder. I need to specify a parent directory in the script, then PowerShell needs to go off and create a separate…
Marc Kean
  • 493
  • 2
  • 8
  • 19
13
votes
2 answers

Powershell argument passing to function seemingly not working

I sense that I am doing something silly, but here is the issue: Function getPropertyOfFile($a, $b, $c) { $a.GetDetailsOf($b, $c) } If I pass $a, $b, $c variables that are appropriate to the function, it fails saying that "Method invocation…
soandos
  • 4,978
  • 13
  • 62
  • 96
13
votes
1 answer

Powershell ISE console window command line word wrap

I am bothered by the Powershell ISE console window. There is no word wrap feature in the command line. When I am using it, if my command line is very long, I will go too far away from the command. Is there any method to fix the width of command…
user4530564
13
votes
4 answers

Why is Powershell ISE showing errors that Powershell console does not show?

I'm running exactly the same script.ps1 file in a Powershell ISE (manually loading the script and pressing F5) and in a Powershell console (executing the script file). They both work but ISE shows errors that the console does not. Why? The code…
Malartre
  • 1,511
  • 18
  • 28
12
votes
3 answers

How can I get the PowerShell ISE to do syntax highlighting on files with a custom extension?

I'd like to start using a custom extension for some of my Powershell scripts, but when I drag them into the PowerShell ISE, they are treated as plaintext, and I don't get any syntax highlighting. Is there anything I can do to get the ISE to…
Aaron Jensen
  • 25,861
  • 15
  • 82
  • 91
12
votes
3 answers

Windows PowerShell ISE running old version

I'm writing my PowerShell scripts with Windows PowerShell ISE. When I change someting in the script and run the script, not the last saved version of the script is executed but the older one. Only if I run the script a second time it uses the…
jlai
  • 348
  • 3
  • 14
12
votes
2 answers

Powershell ISE freezes while killing process

I've ran into a few cases where powershell ISE will freeze when you try to kill a process with Ctrl+C. I can still move my cursor around the console but the status is stuck on "Stopping". This has happened for several commands but one particular…
rob
  • 17,995
  • 12
  • 69
  • 94
12
votes
1 answer

Why my Write-Verbose messages do not appear?

I have replaced some of th ecomments with: Write-Verbose "Doing somthing..." and I run my script via PS ISE like: .\FooScript.ps1 -verbose But in the output window I do not see any of those messages. How can I make the write-Verbose messages…
pencilCake
  • 51,323
  • 85
  • 226
  • 363
11
votes
2 answers

How to convert pipeline to CSV format and specify UTF-8 encoding

In a Windows PowerShell script, I want to execute code which converts a pipeline to CSV format, and encoding should be in UTF-8. How can I do this?
user3189976
  • 111
  • 1
  • 1
  • 4
11
votes
2 answers

Test-Path fails to return $True on a file that exists

I am trying to validate the existence of a file but the problem is that the file name has brackets in the name i.e. c:\test[R] 10005404, Failed with Comments, [S] SiteName.txt. I have tried using the string .replace method with no success. $a =…
user991721
  • 111
  • 1
  • 1
  • 3
10
votes
3 answers

Powershell_ise doesn't refresh modification done outside

How to refresh Powershell_ise for contents modified outside the IDE. Most of the time i would have opened both Powershell_ise and notepad++ If i does changes in Powershell_ise , notepad++ asks for reload but if i modify in notepad++ there is no way…
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
9
votes
3 answers

Where does Powershell ISE store tabs when it crashes?

My Powershell ISE is crashing upon being launched; and I believe it is due to a tab/file that is being loaded when ISE returns from being exited incorrectly. As a result, I'm currently unable to launch ISE.. I'm looking for the file/location where…
EGr
  • 2,072
  • 10
  • 41
  • 61
9
votes
2 answers

Using CurrentDomain.SetData("APP_CONFIG_FILE") doesn't work in PowerShell ISE

I'm attempting to use a .NET 4.0 assembly in PowerShell ISE, and trying to change the config file which is used via: [System.AppDomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $PathToConfig); …
NightShovel
  • 3,032
  • 1
  • 31
  • 35
9
votes
2 answers

Tell PowerShell ISE to not send stderr to Write-Error

The PowerShell console and the PowerShell ISE behave differently when executables write to the standard error stream (stderr). The console (powershell.exe) displays it like standard output. For example, when I get a status with Mercurial on a…
Aaron Jensen
  • 25,861
  • 15
  • 82
  • 91
1
2
3
34 35