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 remove entry from PowerShell ISE

I placed some loose ps1 file in C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MyFolder folder and PowerShell ISE created an entry in the Modules drop-down named with all the variables and functions from the script. Now although…
Dean Kuga
  • 11,878
  • 8
  • 54
  • 108
0
votes
1 answer

PowerShell in Visual Studio 2012

I have a project written in PowerShell and I want to create an interface for it using Visual Studio 2012. How can I load the .ps1 file in Solution Explorer? I have already run through these…
0
votes
1 answer

Copy directories when their name matches -Like txt files

I am trying to copy a bunch of directories. I have text files which have a similar name and I need to match the directories to those text files to determine which directories to copy. This is what I have done and I can't figure out how to fix it. …
0
votes
1 answer

Why does this work in ISE but not when launched from a batch file?

If I run this script in Powershell ISE it works, but when it is launched from a batch file, it does not work. The script is here(clicky). The batch file that launches this is here(clicky). When launched from the batch file, powershell writes (0) and…
Oinkers
  • 15
  • 3
0
votes
2 answers

select multiple switch statements

I have the script below that lets me switch between the different elements and runs the functions in them one by one. But what I need to do now is make it so I can select multiple ones and have them run and pause between them to verifiy if things…
bgrif
  • 253
  • 1
  • 4
  • 14
0
votes
1 answer

Powershell Directory Deletion Positional Parameter error

I've been looking over this script for several days. Worked through a majority of the errors but can't seem to catch what is causing this error. The script is: . $Env:JobDir\Scripts\DeleteMethods1.ps1 #Purge old logs Remove-FilesCreatedBeforeDate…
0
votes
1 answer

in Powershell ISE no output is displayed

Function Add ($x, $y) { $Ans = $x + $y Write-Host “The Answer is $Ans” } is entered and saved as Add.ps1. When add 4 5 is executed, this is the result: PS C:\Users\ddahlenburg\PowerShell> add 4 5 If the same code is entered in the…
0
votes
1 answer

PowerShell: Starting process with variable parsed from Get-Process

I am currently writing a PowerShell script to stop a few processes, start a program, and then restart those processes. The problem arises when I feed the processes into an array variable to restart them later. My code: $direc = "C:\Program…
0
votes
1 answer

Change directory to the location of the operating script

So, I can find out the directory of the script with function Get-ScriptDirectory { Split-Path -parent $PSCommandPath } But I can't manage to change the directory to the folder, where the script is saved. For example cd d:\MyScripts\ So something…
0
votes
1 answer

Can't create a folder, based on file name

I'm trying to create a script that will copy over specific folders and files in C:\Users\ from three terminal servers, onto a file server. The problem is, that I create the folders on the file server based on the name of the folder i'm copying. And…
Arviddk
  • 103
  • 2
0
votes
1 answer

Get fsrmquota path with a wildcard

I'm currently to get the quota details using the following powershell command. get-fsrmquota -Path "C:Temp\ID\1500-1" This works great. I'm trying to get a wildcard path to look for all the IDs that have a ID of 1500. I tried the following sets of…
0
votes
0 answers

Windows Update Removal

I am trying to write a script that will search our computers for certain windows updates and if it finds the update then it uninstalls the update on the computer. Currently it is not restarting. I am using an update on the VM that I know is…
0
votes
1 answer

Need to use regular expressions inside of a function to match a string passed to it

What I'd like to do is create a function that is passed a string to match a regular expression inside of the function. Let's call the function "matching." It should use the -match command. I want it to meet the criteria: The < character Four…
0
votes
1 answer

Odd Powershell Variable Behavior

The script below demonstrates the unexpected behavior in powershell which baffles me. The issue is most likely something I'm doing wrong, but I'm unable to figure it out. The script looks at specific times of specific days and depending on a set…
Colyn1337
  • 1,655
  • 2
  • 18
  • 27
0
votes
1 answer

PowerShell type name evaluation

Unfortunately Powershell ISE can't show intellisense for .NET Classes Constructor. I have found a script which can get the list of Constructor: [System.IO.StreamWriter].GetConstructors() | ForEach-Object { ($_.GetParameters() | …