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
2
votes
2 answers

Try/Catch Script Failing to output $error to file

I am working on a script which will do the following: Check if a service (in this case XboxGipSvc) is running If service is running, do nothing If service is not running, attempt to start service If service fails to start, catch error and log to…
Tee1998
  • 23
  • 5
2
votes
1 answer

Executable output works fine in PS console, but not in Powershell ISE?

I have an SAP program call sapgenpse.exe. If i excute the below command from powershell command, the output is perfect. But if i do the same operation in powershell ISE, the output breaks abruptly.
2
votes
3 answers

Powershell IDE: How to restart interactive shell to clear all variables without leaving Powershell ISE?

Let's say I've been using Powershell ISE for a while and my environment space is starting to get dirty, and I need to restart the interactive shell... I don't want to close my editor and reopen it. How to restart powershell ISE interactive shell to…
Bimo
  • 5,987
  • 2
  • 39
  • 61
2
votes
2 answers

Tree looks different on Cmd than it does on Powershell

Why does the tree command look different on Powershell than what it does on Cmd.
SaTown
  • 25
  • 1
  • 3
2
votes
1 answer

Why can't I create shortcuts Ctrl+U and Ctrl+Shift+U in PowerShell ISE?

I am trying to assign CTRL+U CTRL+SHIFT+U to some PowerShell ISE Addonmenu functions, but say seem to be assigned to some Windows function. I didn't find them in current online shortcut lists either or are there some applications which can…
bernd_k
  • 11,558
  • 7
  • 45
  • 64
2
votes
1 answer

PowerShell ISE: Strange output when executing java -version

In one of my powershell scripts - before starting a Java program - I am echoing the version of the java being used. The PS code looks quite harmless like so: ... Write-Output "Java version:" Write-Output "-------------" java -version ... The above…
mmo
  • 3,897
  • 11
  • 42
  • 63
2
votes
1 answer

How to handle multiple key press simultaneously in powershell? Eg:Windows logo key + Alt + PrtScn:

Tried the below code in powershell ISE but it accept only 1st key (Pressing Win) after that it accepts next key as 'g'.…
GKA
  • 23
  • 2
2
votes
1 answer

How to Replace the AzureRM module with Az in Azure Automation Account

I'm trying to use Azure Automation Account to run some jobs, but I'm struggling with the AzureRM Module installed. I manually installed some Az Modules but PowerShell ISE still using the AzureRM, like in trying to establish RunAs connectio…
Nurhun
  • 475
  • 1
  • 9
  • 21
2
votes
2 answers

Question about ISE vs Console with SystemEvents

When I run the following in PowerShell ISE, it works perfectly, gives me the reason "AccountLock" or "AccountUnlock" exactly as it's supposed to. However, when I run this exact command in an elevated powershell console, it does not return the…
2
votes
1 answer

Powershell command to find registry key advanced audit settings (permissions)

I am trying to use powershell commands to get the registry key advanced audit settings, after a while of testing I have managed to come to this point: (Get-Acl -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion).AuditToString Using that command…
can
  • 31
  • 3
2
votes
1 answer

Moving emails from one folder to another w/ PowerShell

With PowerShell, I'm trying to write a script that will move an email from my inbox to a folder, once I have finished doing what I want with it. This is what I have so far. $folder = $namespace.GetDefaultFolder(6) $filepath =…
JKelley
  • 69
  • 1
  • 1
  • 7
2
votes
0 answers

How to catch Control+C in PowerShell_ISE

Catching Ctrl+C in Powershell (console) can be done in two methods posted here: First: [console]::TreatControlCAsInput = $true while ($true) { write-host "Processing..." if ([console]::KeyAvailable) { $key =…
E235
  • 11,560
  • 24
  • 91
  • 141
2
votes
0 answers

Powershell: how to export variables to an existing runspace (of a different Powershell ISE Tab) and to an existing remote PSSession in that runspace

I'm trying to setup Powershell ISE to manage few VMs hosted under Hyper-V and using Powershell Direct. What I'm trying to do is: collect in one script all relevant "settings" under variables whose name starts with an appropriate prefix, for example…
unlikely
  • 398
  • 2
  • 8
2
votes
2 answers

PowerShell script to savestate of VirtualBox VM works but with an error each time

I have written a PowerShell script to start/stop a VM as follows: $vma is the name of the VM. $vmstate = (vboxmanage showvminfo $vma --machinereadable | % { if ($_ -like 'VMState="*"') { $_ } }) Write-Host $vmstate if ($vmstate -like '*run*') { …
Craig
  • 58
  • 1
  • 6
2
votes
3 answers

Custom read-host dialog for PowerShell 2 CTP3 ISE

Is it possible to hook a custom dialog into the new PowerShell ISE (Integrated Scripting Environment) that replaces the existing .NET WinForms dialog. I am talking about the dialog that the Read-Host cmdlet launches to request for user input.
Klaus