Questions tagged [powershell-ise]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
60 views

Notice When Window Being Created of Other Thread or Process using Powershell

Is there a way to get a notice when there is a window which has just been load and going to be created (e.g. after clicking a button) within other thread or process? I want to use it in Automation for ...
0
votes
1answer
57 views

Use PsExec to run robocopy

Hi I'm currently making a script that copies a directory to another. I'm currently using this: robocopy $splunkconfig 'C:\Program Files\SplunkUniversalForwarder\etc\apps' /is /it /copyall /mir But ...
0
votes
1answer
39 views

Return a row if a column has a partial or perfect match with CSV in Powershell

Basically, I want to search for a string and return any full or partial matches in a CSV format. Let's say I have an object $Shoes that looks like: "Brand","Style","Color","Price" "Reebok","...
0
votes
1answer
240 views

Finding current open file path in PowerShell ISE

I need to sign the scripts I write within ISE to run them. How can I get the path of the current open file in the active tab?
1
vote
2answers
112 views

Moving folders based on condition

I have many excel files in a single folder like below. +----------------------+ | 01012019_LOC001.xlsx | | 01012019_LOC002.xlsx | | 01012019_LOC003.xlsx | | 02012019_LOC001.xlsx | | 02012019_LOC002....
0
votes
1answer
91 views

sqlcmd hangs when started on powershell Ise

I had sqlcmd - Microsoft command line utility - working on Powershell Ise. After installation of SSMS 17 and newer odbc driver, it stopped working. When I start it, it just hangs. It does works on ...
0
votes
1answer
1k views

PowerShell ISE - Is there a keyboard shortcut for commenting out lines or multiple lines

In PowerShell ISE I would like to comment out a line or multiple lines at once with a keyboard shortcut like how Sublime Text does this. Is this possible to add or remove the # shown in the example ...
0
votes
1answer
202 views

Pick up 2 file extensions in a directory using FileSystemWatcher

I am looking to pick up only pdf and rtf files but I get a result of "true" when echoing the variable $watcher = New-Object System.IO.FileSystemWatcher Write-Host "First line of the script, getting ...
-1
votes
1answer
30 views

How to add SAMAccount to results?

Stuck on how to add SAMAccounts (AD usernames) to the results, can anyone help? Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_....
1
vote
1answer
49 views

How to check if a server has a fixed IP address using Powershell?

for me to check if the server has a fixed IP address at the moment I go through a long process, as described on the pictures below, in order, and that is for windows server 2016. my question is: is ...
-1
votes
2answers
320 views

Update Registry Key (Change starting day of week in Windows ) via Powershell - Simple and easy not fancy like mentioned below [duplicate]

I am updating a reg key via GPO but it fails to update (Still Dont know why, though looking into it). Is there a way to do it via powershell ? I will include this in logon script. FYI: HKCU\Control ...
0
votes
1answer
500 views

Can we use canonical name to filter Computers?

I ran a command to get Computers in an OU filtering canonical name rather using searchbase. I got error: “A filter was used that uses constructed attributes” What's that? I think it's because ...
1
vote
0answers
265 views

Powershell - Cannot run multiple commands in PS ISE

I was writing command to get member group of a computer and was then performing a remove operation and then again displaying the membership of computer but the third line of code to display new ...
0
votes
1answer
547 views

How to toggle visibility of console pane or hide it in PowerShell ISE

I've started using PowerShell ISE. It shows two panes at start-up namely script pane and console pane. While writing the PowerShell script I don't want to see the console pane. Console pane is ...
0
votes
1answer
356 views

Connecting to remote desktop using Psexec Tool works with Powershell and Cmd but it doesnt work in PowerShell ISE

I use this command psexec \\ip_address -u user_name -p psw cmd to connect to remote desktop to run commands, it works when you use this in Power shell or command prompt but it doesn't work in Power ...
1
vote
0answers
344 views

Import and merge 2 CSV files using cmdlets in PowerShell [closed]

I am trying to import and merge columns from 2 CSV file into one using Powershell. Please look at my code and advise. I think that it is right, but I am not sure about referencing different columns ...
0
votes
1answer
1k views

How do I set Windows PowerShell ISE default theme?

Whenever I change the theme in the PowerShell ISE options on Windows 10 to Light on Light it doesn't keep it when I restart, it goes back to the default Dark on Light. How can I set/force Light on ...
1
vote
2answers
1k views

Setting explorer size in windows using the Custom Set-Window Script in Powershell

I'm trying to use the script given in this answer Setting window size and position in PowerShell 5 and 6 to set the height and size of multiple windows explorer windows. Not the internet explroer.. ...
2
votes
1answer
720 views

In Powershell, what is the difference between -Property and -ExpandProperty?

Running the cmdlets, the outputs are slightly different, and I'm just trying to understand the difference between the two cmdlets and why you would use one over the other. Example: Get-Date | Select ...
1
vote
1answer
45 views

How can I store a Powershell variable's value as a string while creating ISE submenus

I can't seem to articulate my issue well enough within the search engines to find the answer I'm looking for, so I turn to the community for help: I want to populate my Powershell ISE's menu with ...
1
vote
2answers
732 views

PowerShell ISE - Unexpected Error

I don't get the autocomplete suggestions anymore in PowerShell. In the shell itself I only get a weird little dot where the suggestion should be and when I hit CTRL - spacebar in the script pane in ...
0
votes
0answers
196 views

Powershell ISE: Closing a PowerShell Tab does not unlock a dynamically loaded .NET assembly

Please consider the following scenario. Launch Windows Powershell ISE (64 bit) Create a new PowerShell Tab Create a new PS script which loads a custom assembly by invoking [System.Reflection....
1
vote
1answer
843 views

Windows 10 and RDC Manager v2.7 missing cursor PowerShell ISE

In Windows 7 no problems. Last week had to upgrade to Windows 10. Now I my mouse cursor disappears in the PowerShell ISE in Server 2012 R2. I tried [Console]::CursorSize = 25 from another post, but ...
1
vote
0answers
248 views

Change PowerShell ISE Keyboard Shortcuts

Is it possible with a registry hack or another mechanism to change the default shortcuts in PowerShell ISE? I'd like to modify the debugging shortcuts to be keys that I use in other applications for ...
1
vote
1answer
157 views

How to Keep ISEModuleBrowserAddon from Disappearing in Powershell ISE?

Every time I close and re-start Powershell ISE the Module Browser disappears and I have to re-import the module. Is this just poor intended behavior? Sort of a nuisance to have to Import-Module ...
0
votes
0answers
2k views

PowerShell ISE - Wrapped Find/Replace

The find/replace of Powershell ISE doesn't wrap the search (go back to top of file after end of file) (like seen in Notepad++). Is there a setting to toggle this? Seems to be the first editor I've ...
0
votes
0answers
372 views

Is my PowerShell execution environment subtly corrupted?

I don't expect an answer, but I'm hoping for a direction. Sometimes, PowerShell ISE seems to just act, well, weird. The weirdness seems to come out of nowhere. I haven't found a way to reproduce the ...
0
votes
1answer
4k views

create a calculator with Powershell GUI

So hello guys Im trying to creat a calculator. So far I have the GUI finished. But i Need some help with the backgroundfunctions. Example: i type on the buttons 5+6. Now when i press "=" it should set ...
0
votes
1answer
349 views

Copy content of Buttons into the textbox?

So I am trying to program a simple calculator. I have a very simple question. How can I copy the content of a Button into the textbox? z.B copy Button1 with the content 1 into my TextBox This is my ...
1
vote
1answer
558 views

Very slow clipboard copy from Scripting window

I have an issue in PowerShell ISE (Windows 7) where it takes around 2-3 seconds after copying some text from the scripting area before it actually saves into the clipboard. During this time the ISE ...
0
votes
0answers
470 views

Unable run Powershell Command

This is my first foray into Powershell. When I run a Powershell script I get the following error message: PS D:\modules\setup-azure> Setup-Azure Setup-Azure : The term 'Setup-Azure' is not ...
1
vote
0answers
684 views

Deleting Duplicate files with similar names in Powershell-ISE

I have a few hundred thousand files to go through which are all sitting in one folder. I need to find and delete the duplicates. The problem is, the duplicate files only have similar names, not ...
1
vote
1answer
505 views

Powershell Script not firing

I'm pretty new to powershell but im executing the following script in PS ISE: $source = "E:\MEX_Websites\Customer_Hosting\MyFolderB\Reports\" $filter = "*.*" $fsw = New-Object System.IO....
4
votes
2answers
2k views

Reverse search in PowerShell ISE wanted

In Bash, you can reverse search your history using Ctrl-R and start typing. Is there a similar feature in Windows PowerShell ISE?
0
votes
1answer
745 views

Run and edit a Perl/Python/non-Powershell - Script in Powershell_ISE (Windows Server)

I am on a Windows Server (2012) with Powershell_ISE and befor installing additional software I wanted to edit and test a script in the Powershell_ISE (it's a better native solution than using notepad +...
0
votes
1answer
684 views

Powershell ISE cannot attach to Docker container / Windows Container

I can connect and attach to a docker container / windows container on Windows 2016 Server just fine with Powershell. But when I try the same with Powershell ISE, I get the error below. PS C:\> ...
1
vote
1answer
2k views

Can I load Powershell AD Module as another user?

I have a script that I use to automate AD and Office 365 account provisioning. Everything is working just fine. The only "problem" is that I have a regular domain account and another account which is ...
3
votes
2answers
829 views

Power Shell Script to export mailbox

I have a script its working and it is programmed to take backup for every mailbox for a month and store it to local shared drive. When I run the script it export whole database instead of specified ...
5
votes
2answers
15k views

Always Run PowerShell ISE As Admin

I have Windows 10 and run some PowerShell commands through the Outlook COM object. This requires PowerShell to be running the same level of access (running as admin or user) as Outlook. As I need ...
1
vote
2answers
2k views

PowerShell ISE open previous files

How can I configure PowerShell ISE so that it will open tabs for each file that was previously opened when I closed it? This is particularly helpful since I typically come back to work on the same ...
2
votes
1answer
1k views

How do we get statistics from a continuous ping in PowerShell?

In Windows command prompt, when you Ctrl-C out of a continuous ping, the terminal will display the statistics: Ping statistics for ::1: Packets: Sent = 6, Received = 6, Lost = 0 (0% loss), ...
1
vote
1answer
2k views

Different results between “PowerShell ISE” and “Run with PowerShell”

I have two simple one line "scripts". They check how old are certain files in a certain folders. One displays the output to the screen and the other writes the output to a text file on the desktop. ...
12
votes
1answer
17k views

Line wrapping in PowerShell ISE Console?

I sometimes write long lines of code as I am playing with things in the PowerShell ISE (v4 on Windows 8.1). I find its console window helpful in many ways, but I'm unable to figure out how to ...
2
votes
3answers
892 views

How does one start the Powershell ISE with no file open?

When I launch powershell_ise.exe, it defaults to having an open file "Untitled.ps1". Is there a mechanism to ask ISE to launch showing only the prompt? That is, at the moment when I launch Powershell ...
1
vote
2answers
732 views

Powershell ISE 3.0 Intellisense for other programming languages

I really love using Powershell ISE - something about it makes me want to work with it; everything just fits together well, and it is smooth. Also I love the way intelligent autocomplete is ...
0
votes
1answer
343 views

Can't get powershell to return where results from GCI using ACL

I'm trying to get Powershell to list files in a directory that are older than a certain date and match a certain user. I've got the below script so far which gives me all the files older than a ...
1
vote
1answer
1k views

PowerShell ISE doesn't flush stdout

I'm having a little problem when running a console program in PowerShell ISE: when the program writes out a line in portions using flush, PowerShell won't show the line until the program writes a line ...
1
vote
1answer
2k views

Unable to SSH to my virtual machine via Windows Power Shell ISE

I have a Linux VM guest running in my vmWare host that I want to access using Windows PowerShell ISE. I normally can SSH to my VM, but I cannot with Windows PowerShell ISE. When I try to do SSH to my ...
4
votes
1answer
2k views

Environment.OSVersion in PowerShell vs PowerShell ISE

Why is it that I see 2 different versions of my OS from PowerShell and PowerShell ISE? The OS: Microsoft Windows Server 2012 R2 Datacenter Evaluation PowerShell: version 4.0 PowerShell PS C:\> [...
6
votes
1answer
3k views

How to lock Powershell ISE console output scroll?

I'm using Powershell ISE for running some batch scripts. The outputs will be long and these programs will run for quite a some time. The problem I'm facing is I'm unable to lock the console output to ...