Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 8583 articles
Browse latest View live

Strangeness with looping through flowlayoutpanel controls

So I have a PowerShell tool that uses WinForms GUI.The GUI has one main flowlayoutpanel that in turn has roughly dozen flowlayout panels as child-items. These flowlayoutpanels contain groupboxes that...

View Article


Image may be NSFW.
Clik here to view.

How to enter password in the Sharepoint Login Popup

Hi,I am trying to automate the login for SharePoint currently. This is my code - $pwd = Read-Host 'Enter password' -AsSecureString #gets password from userStart-Sleep -Milliseconds 1000$ie = New-Object...

View Article


formatting issue

I have this code which works.  But the format is not what I want.  The format has distinguishedName, description and displayname on separate lines.   $sourceOU1 = "OU=Physicians,OU=MGH...

View Article

export-csv not working as I expect

I have the following code that I thought was going to write the values of the array of arrays or the array but in both cases, the results I'm getting are confusing to me (results look like attributes...

View Article

Image may be NSFW.
Clik here to view.

Sorting issue in import-csv

 I have CSV file contains below data. I am not able to sort the numeric data (with couple of string included) as desired.  Percentage99.9110099.96NoObjects10010099.9499.61 When I use the below...

View Article


How to resend an email if send-MailMessage fails?

My company's SMTP server is a little wonky.  Every so often when I send an email to it from Powershell it will fail because the STMP server refuses the connection. I'd like to create some Powershell...

View Article

Use Group Policy to provide users a standard Windows 8.1 Start screen

One of the big problems with Windows 8 was that there was no easy way to enforce a consistent Start screen for end users. Microsoft has addressed this problem with the Windows 8.1 Start screen, and it...

View Article

Script to find SMTP addresses with #2 after them

Good Day all, I am running Exchange 2010 in my environent and as you know if you create an address for a user that already exists it will create the account with First.Last2@my domain.com.Is there a...

View Article


Export user where the name is not the same of the givenname

Hi I want to export the list of my users but only the one that don't have the same givenName and the sn. Because I have generic users so I don't want them in my list Get-ADUser -Filter * -Properties *...

View Article


Log File Processing - How to get PowerShell to remember where it last read in...

Hello PowerShell Experts,I'm looking to implement a log file monitor on a Server 2008 R2 system that watches for out of memory conditions.  Searching a log file for a string of text is no problem.  Got...

View Article

Seeking Performant Filter On Many Items

Is there a more efficient way to filter thousands of items from a SharePoint library than this below?$FilteredListItems=$list.Items | ?{$_["CustNum"] -eq$currentCustNumber}Scenario:• I am exporting...

View Article

Delete last occurrence of a string in a file

Hi,I'm using PS to generate some SQL files, a bunch of them being multi-table inserts. How would I delete the last occurrence of UNION ALL in my files?Thanks

View Article

Getting SQL Server Performance Data with PowerShell

Once you've got your SQL Server environment set up and working the way you want it, it's time to start gathering your baseline performance data. A baseline is critical because every workload is...

View Article


4 Essential PowerShell Provider Commands for SQL Server

Windows PowerShell commands can be a valuable addition to your SQL Server management tools. Although I don’t think PowerShell is going to replace SQL Server Management Studio (SSMS) anytime soon, it...

View Article

Add a Progress Bar to a Graphical Status Box in PowerShell

Jeffrey Hicks shows you how to build on the code from a previous lesson to add a progress bar to your status box.Read More 

View Article


Running commands simultaneously

I am trying to create a Powershell script that will run multiple instances of Robocopy at the same time.  Is there a cmdlet in Powershell that will do that?

View Article

Set Powershell Execution Policy via Batch script?

I finally finished a big Powershell script, learning Powershell all on my own via the Internet, to "build" a Windows 7 PC that has only the operating system and an Administrator account.  My script...

View Article


Create computer accounts from csv

Hello my first post here looking for help creating multiple ad computer accounts from a csv file. We also need a specified password set using the accountpassword field.  Would anyone one have or be...

View Article

Power Shell vs AutoIT

How does Power Shell compare to AutoIT in terms of:1. functionality2. complexity 3. learning curveCurrently my interest is for non-GUI functionality, especially for disk/folder/file management, PC...

View Article

Image may be NSFW.
Clik here to view.

Powershell script to Install Certificate in Active Directory store

Hi Everybody!I'm trying to write a powershell script to install a certificate into the active directory certificate store,Here are the steps to do this manually, any help would be greatly...

View Article
Browsing all 8583 articles
Browse latest View live