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
0
votes
1 answer

How to print output of affected rows with Powershell and MySQL?

I'm having a little problem on how to execute two queries one after the other. In my Powershell script I'm adding records in a loop (which works perfectly fine). Outside the LOOP I execute a query to Delete "x" number of records based on the…
mario
  • 149
  • 3
  • 15
0
votes
1 answer

Powershell - RPC, OBJ Null and -Replace ERRORS in MySQL insert query

I have this insert query that's not inserting properly and is really annoying. I will explain briefly what I tried and what I actually want to achieve. What my PS script does: ping every computer from a database table if ping succeeds, get…
mario
  • 149
  • 3
  • 15
0
votes
1 answer

Powershell: Filling current row with color in Excel Spreadsheet

Been working with Powershell script which runs a loop against a bunch of machines and generates an Excel spreadsheet with the results using a foreach loop - would like to fill the color of a row based on a certain criteria. I don't have any PC's…
n00b
  • 47
  • 1
  • 3
  • 7
0
votes
1 answer

Powershell - Insert into MySQL database table errors?

I have this insert query that's not inserting properly and is really annoying. I will explain briefly what I tried and what I actually want to achieve. What my PS script does: ping every computer from a database table if ping succeeds, get…
mario
  • 149
  • 3
  • 15
0
votes
2 answers

How to retrieve user logged on by reading computer name from database?

I am very new to powershell and have this script that will ping every computer from a database server. I am using MySQL (yes I know most people use MSSQL with powershell but in my case I have to use MySQL). The ping works perfectly fine, how can I…
mario
  • 149
  • 3
  • 15
0
votes
1 answer

Tabexpansion function Does Not Resolve Variable

I'm attempting to override and implement my own TabExpansion. In the function I want to parse the contents of $psise.CurrentFile.Editor.Text when a certain $lastword criteria is matched. The issue I have is that the variable…
Chad Miller
  • 40,127
  • 3
  • 30
  • 34
0
votes
1 answer

Exclude Folder during recursive file search

for hours I've been struggling to get powershell to do the following: Use the base directory C:\Users and go recursively through all folders excluding the AppData folder of each user dir and also excluding the users named: $exclude =…
Tony Clifton
  • 703
  • 3
  • 14
  • 27
0
votes
2 answers

Executing a powershell script using C# is secure or not?

I need to execute powershell script using C#.net, so my concern is security in a production environment, is it secured or not to execute a powershell script using C#.net. If not what are the ways to ensure security, also i need to pass parameters…
Dev
  • 410
  • 5
  • 23
0
votes
1 answer

Powershell script to batch copy folder and incrementally rename the copied folders

I've googled and keep finding solutions but cannot tweak them properly, Looking for help with my powershell solution to batch copy a sub folder called TEST0000 and copy the inputted amount to another folder called Prod with incremental folder names,…
0
votes
1 answer

How to get file with current date?

i have a script that gets "app_sub.txt" everyday and renames it with process date&time stamp "app_sub-2014-09-17@07-21" and moves it in different folder. $conCAdir1 = "C:\Udata\CommonApp\" $conCAdir1pro =…
0
votes
1 answer

Powershell Kill all processes except system

In powershell, I would like to kill all processes for all users, except explorer and processes used by the system This is where I am including the errors that are given: $Cred = Get-Credential; Invoke-Command -ComputerName localhost -Credential…
0
votes
1 answer

Powershell ISE F5 behavior for script module (.PSM1 file)

When I'm editing a PowerShell script module (.psm1) in the ISE, and I press F5, nothing happens. It doesn't even save the script module to disk, like it does if I'm editing a script (.ps1) file. What I'd expect to have happen is for it to save the…
Burt_Harris
  • 6,415
  • 2
  • 29
  • 64
0
votes
1 answer

Replace the first occurrence of the string using regex in powershell

I was working some replace string using regex in powershell. But When I try to implement the first occurrence in the stringto replace a word. It does not work. (((Grant Execute.*)\n+go)(\n)?) This is my working regex if I want to replace all the…
Ian
  • 9
  • 4
0
votes
1 answer

How to get the Hello "Newline" and World in powershell using regex?

How to get the Hello “Newline” and World in powershell using regex? Hello World I have to get the Hello World from a text file. I'm using powershell.
Ian
  • 9
  • 4
0
votes
2 answers

How do I replace a word with a new line and a word using regex with an empty string in Powershell?

How do I replace a word with a new line and a word using regex with an empty string in Powershell? Below is a sample content... I need to delete all the use database and go I'm using powershell and powershell_ise for editor: use…
Ian
  • 9
  • 4