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

Experts Exchange > Programming > Prog Languages > Scripting Languages >...

'm using the below PowerShell script, by @hicannl which I found here: http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Create-Active-7e6a3978#content, for bulk creating users from a CSV...

View Article


DS 6.9 Powershell scripts executionpolicy

When I run a powershell script from the DS 6.9 SP6, either inline using the #powershell designation or from an external ps1 script, it complains that "powershell execution policy is restricted".  Read...

View Article


One-liner PowerShell to set IP Address, DNS Servers, and Default Gateway

A fun part about configuring servers is that many servers still have static IP addresses.  The challenge is losing connectivity to the server when the configuration change is made.  Even with remote...

View Article

Import CSV Cleanup into PowerShell

I love using Import-CSV because anything you import will be converted into an object. The source of your CSV file can come from anywhere. It does not have to be created in PowerShell. This is extremely...

View Article

Exchange 2007 Bulk User creation

I'm having some trouble with a script I've created and hoping someone can help.  I need to create over 100 thousand 'Mail Contacts' and hide them from the Exchange Gal while creating them.  I've been...

View Article


Get-AdUser and the msExchHideFromAddressLists attribute

Hi,I'm trying to run a query that will show me all users in the Domain that have there showInAddressBook attribute set to null and the msExchHideFromAddressLists set to True. I'm having trouble...

View Article

PowerShell Script To Stop/Start Application Pools In IIS 7.5 Servers Remotely

Hello:Currently, I have the following script which works OK inside the server where I am running for one application pool (in the below case...

View Article

Export group membership of user to csv file

Hi, When I run the follwoing command to display group membership of a user I can see the groups.get-aduser -filter { CN -eq "username" } -searchbase 'ou=users,dc=domain,dc=com' -properties memberof |...

View Article


need some help from powershell newbie

I am new to poweshell, I have this modified script running file on local PC but cannot use remote call . (Powershell remoting is enabled via GPO )The script running fine at local host icm...

View Article


How to specify Y-axis Maximum Value in Excel Chart?

I wrote the following code to create a chart in Excel, but I need to specify that the Y Axis be fixed at 100 instead of set to the default of Auto.# Generate graph $xRow =1 $yRow = $rows...

View Article

Powershell scripting Merge VHD Help

Hi all, I was wondering if there is a way that powershell will automate these steps(Recovering Your Virtual Machine. How to Manually Merge Hyper-V Snapshots Back into one VHD)?...

View Article

automated email alert each time any user attempts to login to servers using RDP

Hi,I am totally new to Powershell and scripting and would very much appreciate some help.I have a user that needs to be notified each time someone RDP's to two specific application servers.Does anyone...

View Article

#PSTip Using XPath in PowerShell, Part 1

This is the first tip in a series of Select-Xml/XPath tips. Working with XML documents in PowerShell is relatively easy. For most things it is enough to read XML file and convert it to XmlDocument...

View Article


#PSTip Using XPath in PowerShell, Part 2

XPath can be used to apply ‘filter left’ philosophy to XML documents. For example we can find any h1 element with ‘title’ id using the following syntax:Read More

View Article

Working with complex ldap filters in Powershell

When working with Active Directory and Powershell using ldap filters is a great way of searching the directory with great performance. The only problem is that ldap filters tend to be a bit hard to...

View Article


Select only two decimal places not round

Hi,Can you help me please how to select only two decimal places and not round the result for example:$example = 4.57969 $result = 4.57 not 4.58Thanks in advance!

View Article

Regex rename multiple files

Hi,   I have a direcotry with about 20 .sql files which i need to rename. File pattern is...

View Article


& $pshome\Configure-wsman.ps1 Not recognized

I am new to PowerShell and I'm stuck on this step in this book I bought two days ago that teaches beginners about powershell. The book wants me to configure WS-management   protocol to work with...

View Article

String formating question

Hello can someone please help me with the following question pleaseI want to result to read 5% "{0:P}" -f 5However the output is 500.00%How can I make the above output 5% please?also I understand you...

View Article

Image may be NSFW.
Clik here to view.

find active users question

I have this code that works. get-aduser -ldapfilter "(&(&(objectCategory=user)(userAccountControl=512)))" | Select sAMAccountName, Enabled, givenname | out-file c:\temp\\users1.csv The problem...

View Article
Browsing all 6937 articles
Browse latest View live