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

PowerShell Workflow for Mere Mortals: Part 5

Summary : Microsoft Scripting Guy, Ed Wilson, concludes his five-part series about Windows PowerShell Workflow.Read More

View Article


#PSTip Dynamically hiding a function from the debugger in PowerShell ISE

 In this tip, I want to show a dynamic way of doing the same, a way that doesn’t require access to the function code if for any reason you cannot decorate a function with the mentioned attribute. Here...

View Article


PowerShell v4 Desired State Configuration Cheat Sheet

If you are interested in the new PowerShell v4 feature Desired State Configuration you can download a Cheat Sheet at the Microsoft Download Center.Read More

View Article

export-csv over writing 1st row

I have a powershell script that imports a list of students, ids, school, etc.. the script seems to work fine (i've stepped thru it in the debugger and i see it writing and overwriting the data) but...

View Article

Parsing column in csv file

I haver a csv file with a column containing host names. Occasionally the host name is shown as a FQDN and I need to remove the domain part ie '.me.co.uk' for those entries. The data comes from...

View Article


Create PS script for PS 2.0 on computer with PS 3.0

Hi, I have Win7 and Windows PowerShell 3.0 on my computer.I wonder, can I choose PS version when I create script, like in Visual Studio when i create new project and I choose .Net Framework version on...

View Article

SQL Servers Service status

Hello everyone.Can anyone offer me some advice on how to check thru a list of servers to check their SQL server service status , started , stopped etc.I need to do this using SQL authentication as I...

View Article

Connect to SQL Compact Edition (CE) using PowerShell

Hello,I support an application that deploys an .sdf file. I would like to query/edit the contents of the file using PowerShell.I'll assume I'll need at least CE and the SQLPS module installed. I'm OK...

View Article


gwmi win32_product error ONLY in win xp

Hi  All,I am creating a script to collect some system information for multiple servers. As a part of it, I am collecting softwares installed in group of machines. I am taking the list of softwares...

View Article


working with csv files

I am having trouble working with a csv file.  I was hoping someone might know how to help me.  The problem is the first column in my file is all text so when I use get-unique it works on that column....

View Article

Running PowerShell in Windows Server 2012

Hello allI have an issue when I run a script on a Server 2012 box with PowerShell v3.0. I have scripts that I developed in PSv2/2008R2 that run just fine when I call to my PS1 from a batch file that...

View Article

Creating a shortcut as a PIF

Hello,I am trying to create a shortcut however I need the shortcut to be created as a .PIF.Currently I am using the following which will create a shortcut however I cannot get it to work as a .pif as...

View Article

Proxyaddresses

Powershell v3.0 Currently having an issue when trying to replace proxyaddresses.1st I get the proxys$proxys = (get-aduser $username -properties proxyaddresses).proxyaddressesThen I change the users...

View Article


Query AD for User Properties from Email Addresses in Text File

I'm new at Powershell and have some code that I've started that is not working. I think I have something out of place. I can pull a list of users from my entire Active Directory. But I need this script...

View Article

Problems consuming parameters by propertyName from ADObjects using Alias

Hi!I have a parameter named "signature" which I want to be able to pipe data to from ADObjects (from the module ActiveDirectory). Adding an alias named "samaccountname" to the parameter "signature"...

View Article


Running a Perl program from within PowerShell

I want results from a Perl 'print' command that is in a Perl program that is invoked from within a PowerShell script to appear in the PowerShell window through which I invoke the Perl program.I do see...

View Article

How to prevent PS from saving a single command?

I want to run a command in PS, however I do not want PS to record it in the history. This is possible in bash by using  a space before the command. 

View Article


Image may be NSFW.
Clik here to view.

Read each line from text file and write to excel

Hi All,I am currently working on script where I have a list of servers in a text file. Something like,server01server02server03one by one in a line. Now I want to read each line from this text file and...

View Article

Yet another AD bulk script problem

Seems to be a common topic in these parts, but forgive me as I went way over my head with this. I haven't done much powershell scripting in the past and I'd appreciate any help I could get with...

View Article

Getting a report with hidden users

Hi Guys,Exchange 2010I am trying to find all users that are hidden in exchange and that are forwarding emails to others. Or if you have something better to find disabled users forwarding email will...

View Article
Browsing all 6937 articles
Browse latest View live