Questions tagged [powershell-ise]

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

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

Windows server manager got uninstalled after deactivating windows power shell ISE (Windows server 2016)

After removing Windows Powershell ISE feature, the server manager became unavailable until reenabling/activating Powershell ISE. any help on how to remove it without affecting server manager
user avatar
0 votes
1 answer
25 views

Need Remote computer to grab local files

so I'm currently working on our Staging server, which has Admin privileges that I do have. So I've tried the Invoke-Command cmdlet and the Enter-PSSession cmdlet and although these still could help, ...
user avatar
  • 49
0 votes
1 answer
17 views

Powershell not processing beyond 1 entry in array. How can I make this work?

New to this. I have made the below script to download the newest versions of the applications and install them, but it only ever processes the first entry innosetup[0] $inno ="https://downloads....
user avatar
0 votes
1 answer
68 views

How and Where to use Line Break in PS ISE

I have a script that I will post down below, and the console feedback is kind of ugly, which I will also post below the script. I am wondering HOW and WHERE do I put a line break to ensure the console ...
user avatar
  • 49
0 votes
1 answer
21 views

Running script on server prevents local copy & paste

I have a powershell script running on a server which performs some copy and paste commands with files. While the script runs, if I copy something on my local machine it doesnt not copy; the script ...
user avatar
3 votes
2 answers
156 views

Excluding a specific folder in PowerShell

I'm pretty new to scripting, as well as to PowerShell. What I'm trying to do is deploy files from one folder (C:\Deployments\QA\QADEP-1504\Processor Handlers\Release) to another folder on a remote ...
user avatar
  • 49
2 votes
1 answer
503 views

Windows PowerShell ISE freezes on launch every time - how do I diagnose?

Every time I launch PowerShell ISE (x64 or x86), I get this: It is drawn exactly as shown and immediately unresponsive. The black part at the bottom is within the window boundaries. PowerShell CLI ...
user avatar
0 votes
0 answers
135 views

uninstalling the chrome using powershell script

I am trying to uninstall google chrome using powershell script but it shows me a popup to choose uninstall/cancel. How can i supress this by choosing uninstall button? Set-Location 'path\to\my\chrome' ...
user avatar
  • 1
1 vote
1 answer
999 views

How to check if process is running properly in Powershell?

I'm writing some powershell to check if the Google Drive for Desktop process is running. If it is, I need to stop it and restart it. I'm having trouble understanding how to avoid throwing errors if ...
user avatar
0 votes
0 answers
30 views

Stop Powershell from making new line for each argument using pscp

I'm trying to copy a log file from a Linuxserver using this Powershellscript. $serveruser = 'user' $passwd = 'somepw123' $saphost = 'SAP1' pscp -pw $passwd $serveruser@$saphost':/var/log/...
user avatar
  • 1
0 votes
1 answer
2k views

How to get current path in powershell into a variable

(I don't speak English. Hope you understand.) Hi, I have a powershell script(.ps1) and it needs to work with the current path(e.g. "C:\Users\user\Desktop"). I don't know how to set it into a ...
user avatar
  • 15
1 vote
1 answer
56 views

Regex: Put some tags at the beginning of the line, but only those that are framed in a comment html

I wanna put some tags at the beginning of the line, but only those that are framed in a comment html. For example: <!-- ARTICOL START --> <p class="text_obisnuit">I want go home&...
user avatar
  • 730
0 votes
3 answers
185 views

Regex: Select and Delete everything that is framed in the comments html tags

I have this html code. And I want to select/delete everything that falls between the comments <!-- ARTICOL START --> and <!-- ARTICOL FINAL --> except all those <p class=..</p> ...
user avatar
  • 730
0 votes
1 answer
32 views

Enabled AD Group Members of multiple groups

I'm trying to get only enabled members which are in multiple groups but not sure how to achieve this in the format I want. My current script is as follows. $GroupList = @('GroupA','GroupB' ) $...
user avatar
  • 1
0 votes
2 answers
2k views

Difference between Echo and Write-Host in PowerShell ISE

I'm starting to learn (beginner) about PowerShell script. I found that echo and Write-Host both can display output in the console screen, so what is the difference between them? I read this question ...
user avatar
  • 49
2 votes
1 answer
96 views

Echo statement is not working inside ForEach-Object loop unless you use break statement. Why and any alternative to fix this?

I was designing my own function which renames the .ps1 file to .psm1 with the same name of .ps1 file. Example: Add-UdfUser.ps1 will become Add-UdfUser.psm1. It works completely fine. It changes the ...
user avatar
2 votes
2 answers
2k views

Getting error when converting string to formatted datetime in powershell "String was not recognized as a valid DateTime"

I'm retrieving the Media Created column field from file explorer this way: $mCreated = $shellfolder.GetDetailsOf($shellfile, 208); And that works fine. It gives me the string "5/‎7/‎2017 ‏‎4:09 ...
user avatar
  • 289
0 votes
0 answers
58 views

PowerShell ISE running previously ran script on running new script

PowerShell ISE I have two scripts : A.ps1 and B.ps1 1> I will run A.ps1 Script. It Ran successfully and Logging logs in local file. 2> On running B.ps1 script. Still executing A.Ps1 script in ...
user avatar
0 votes
1 answer
188 views

How to run power shell script using different local admin count

In my computer, I have used 2 local administrator accounts which are inbuilt one(Admin1) and newly created one(Admin2). Both accounts are a member of the Administrator group. I have a PowerShell ...
user avatar
1 vote
0 answers
969 views

Powershell persistent history in the ISE

(EDIT 2: now including the output of Get-Module) In a Powershell prompt I have persistent history across sessions (see this related question). But when I launch the Powershell ISE, I do not have ...
user avatar
1 vote
1 answer
162 views

Powershell: Fails calling function when run as batch

I have created a GUI for my script. The user selects from two lists, and then clicks a button to load the programs. In ISE, everything works fine. However, when run from a batch file, (or *ps1 file ...
user avatar
2 votes
1 answer
4k views

How to merge multiple excel files and update the merged file's worksheet names as excel files?

Can somebody please help me to resolve this. This is my requirement: I have few excel files (It will vary) in a folder D:\Script\Test The name of the files are ExcelA, ExcelB, ExcelC etc It has ...
user avatar
0 votes
1 answer
304 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 ...
user avatar
0 votes
1 answer
368 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","...
user avatar
  • 101
0 votes
1 answer
1k 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?
user avatar
  • 1,758
1 vote
2 answers
269 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....
user avatar
  • 113
0 votes
1 answer
232 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 ...
user avatar
6 votes
4 answers
12k 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 ...
user avatar
  • 991
0 votes
1 answer
693 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 ...
user avatar
  • 1
-1 votes
1 answer
35 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 $_....
user avatar
  • 11
1 vote
1 answer
686 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 ...
user avatar
-1 votes
2 answers
1k 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 ...
user avatar
0 votes
1 answer
4k 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 ...
user avatar
1 vote
0 answers
1k 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 520
0 votes
1 answer
836 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 ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
1 vote
2 answers
2k 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.. ...
user avatar
  • 113
5 votes
1 answer
3k 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 ...
user avatar
  • 85
1 vote
1 answer
91 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 ...
user avatar
1 vote
2 answers
1k 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 ...
user avatar
0 votes
0 answers
349 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....
user avatar
  • 111
1 vote
1 answer
1k 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 ...
user avatar
  • 113
1 vote
0 answers
308 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 ...
user avatar
1 vote
1 answer
262 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 ...
user avatar
0 votes
0 answers
3k 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 ...
user avatar
0 votes
0 answers
591 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 ...
user avatar
0 votes
1 answer
6k 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 ...
user avatar
0 votes
1 answer
411 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 ...
user avatar
1 vote
1 answer
771 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 ...
user avatar
  • 289