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

Powershell Group Values Winforms Charts

Im having bit of a problem. I am trying to achieve something like this: http://www.codeproject.com/Articles/168056/Windows-Charting-Application The first chart on the page. I have my code here ### Load…
user2782999
  • 385
  • 1
  • 7
  • 23
0
votes
0 answers

Running a PowerShell script as a scheduled task produces different results

I am running Windows Server 2012 used as an admin server. Here I have it setup to run PowerShell scrips as scheduled tasks to do various tasks on remote servers using Windows Remote Management aka Remote PowerShell. The following script is one of 4…
Marc Kean
  • 493
  • 2
  • 8
  • 19
0
votes
1 answer

Unable to create "Microsoft.SqlServer.Replication.ReplicationServer" object

EDIT 1 : I am able to create replication objects successfully via Windows PowerShell ISE but NOT PowerGUI. The script used to run successfully on my 32 bit machine and now errors on my 64. Issue looks to be an environmental issue. I'm attempting to…
0
votes
3 answers

Strange behavior of PowerShell matching against array string element

I'm quite desperate for tips here. Here's my quandary: First, I had an array of string, which I created this way (showing a subset of the numbers): $a = @" 00013120747 00013051436 00013110491 00002100011 "@ $aa = $a.Split("`n") Next, I generate a…
pepoluan
  • 6,132
  • 4
  • 46
  • 76
0
votes
1 answer

One line of output at a time

I want to get one line of output at a time while running this command. Invoke-RestMethod -Uri http://blogs.msdn.com/powershell/rss.aspx | Format-Table -Property Title, pubDate So I want to get one line of output and then press Enter or Any key to…
0
votes
1 answer

Exporting a CSV adjusting a category with ToTitleCase

#First Name $GivenName = Import-Csv .\Documents\db1.csv | select GivenName $UserF = (Get-Culture).TextInfo.ToTitleCase($GivenName) $UserF | Export-Csv .\Documents\UsersF.txt –NoTypeInformation When I run the script I get a .txt file with #TYPE…
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
2 answers

Retain coloring scheme for Powershell cmdlet after execution

Is there any way to retain the Powershell command coloring scheme after execution of the command in the Console Pane. And is there a way to color the output column-headers separately. None of the themes I browsed or could find online achieve this.
Ayan Mullick
  • 67
  • 2
  • 11
  • 38
0
votes
2 answers

Choosing selected files issue in PowerShell

Hi PowerShell experts, I have a few files in a folder (folder A)with no extension (.file) I have to change a few files content in folder A like this: $configFiles=get-childitem . *. -rec foreach ($file in $configFiles) { (Get-Content…
sar04x
  • 49
  • 1
  • 2
  • 7
0
votes
1 answer

File with no extension not changing on powershell

I have the following code: Get-ChildItem . *. | Rename-Item -NewName {$_.Name -replace 'line21','line21.map52'} producing this error: file: line21 is currently of type File (No extension). When trying to change it to another extension it does not…
0
votes
3 answers

Output Values from gc into Hash Table

Trying to make a hash table with 2 categories: Users and Passwords. This is my code thus far but the issue is the output only displays the command and does not execute it. for ($i=1; $i -le 10; $i++){ $caps = [char[]] "ABCDEFGHJKMNPQRSTUVWXY" $lows…
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
2 answers

Generating a random password according to RegEx

I am trying to generate a 6 character password but I want each letter to match correct RegEx. The RegEx being: [a-z][A-Z][0-9][a-z][!@#$%^&*?+][A-Z] I am currently here: $passwd = @(1..6) For ($i = 0; $i -lt $passwd.length; $i++){ Get-Random…
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
2 answers

Number of all users registered on the system (not Active Directory)

I'm trying to get a list of registered users on current system. I tried gwmi win32_userprofile but confused on which line it is on.
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
2 answers

How do I force input to be string only?

I need the user to input a title of a book. I need to make sure they input string only. This is where I'm at so far, any guidance please. Do { $strTitle = Read-host "Enter the book title"} while ($strTitle -eq "")
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
2 answers

How validate user is in the correct directory?

Hey guys I'm writing a quick script, just before it enters the if block, I need to make sure the user is in the Documents folder. if ($pwd -not $DocumentsPath) thats the condition I used but I keep getting an error that states: Unexpected token…
Musa
  • 553
  • 1
  • 7
  • 19
0
votes
1 answer

Should I Make Variables for Paths?

$backup = “c:\users\public\document\backup $file = “$Home\documents\Win213Notes.txt If (Test-Path $file) { mv $file $backup } Else { Write-Host “File Not Found” } Is it smart to put pathnames into a variable?
Musa
  • 553
  • 1
  • 7
  • 19