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

Reading text file with -context

Hi,I am reading file with select-string and capturing lines which I need using -context. I am stuck how to remove file name and line number in the outputPS E:\> Get-Content...

View Article


How to handle an onClick event of an HTML element in a...

Can anyone provide a simple example of how to capture the return value of a click event on an element inside a System.Windows.Forms.WebBrowser control using Powershell 2.0?

View Article


SCCM Pre-Install Apps using Powershell Script

Hi All,I am an SCCM Admin. We are Migrating from Windows XP to Windows 7. We have around 80% of apps in App-V and we are planning to install apps we in advance before the users get his machine.We are...

View Article

Powershell Script to relocate User's Profile folder during Deprovision

Hi,I'm trying to write a script which, upon execution, move a user's profile folder from it's original location (in the \\server1\profile$ folder) into a sub folder in that location...

View Article

How can I used Error Traping / Error Action with .NET type

HelloI wounder if someone can help me with the following question please.If I do the following[ System.IO.Directory]::EnumerateFiles("\\Server1\Directory1","*.ps1",AllDirectories)I get a list of files...

View Article


Exchange 2010 Search-Mailbox Issue

I am having a problem getting "Search-Mailbox -SearchQuery" to accept a variable.There are examples in the script on how to properly format the query (not shown here).The problem appears to be the...

View Article

Powershell and .Net Framework

Hello everyone,First of all i would like to thank you guys because it's been a while that i'm reading the daily tips that you send and i find it really great to keep my mind into Powershell.I...

View Article

copy file(s) to a Win32_USBControllerDevice ?

Hi there,I've got a tablet that is visible in windows explorer as a portable device and with explorer i can copy files to it. Unfortunately this tablet is not able to be visible as a drive with a...

View Article


In search of a way to identify workflows within a SharePoint site collection

We are running MOSS SharePoint 2007. There is a v1 install of PowerShell on the Windows 2003 server for the farm.There are several types of workflows within SharePoint 2007. There are the out of the...

View Article


Simple change of password?

I am writing a PowerShell script to build a Windows 7 PC (add user accounts, add user passwords, add our applications, turn on FTP Server, et al).  One of the first things I need to do is change the...

View Article

ADBackup Bitlocker

hello all,  i am doing the following:Invoke-Command -ComputerName $computername -ScriptBlock { manage-bde -protectors -get e: }to get the bitlocker information, output is: Volume E: [xxx]Alle...

View Article

Functions of Functions

Sorry my terminology may be off as I'm learning still!I'm writing code where I am going to reuse chunks of code in my script so want to make them into functions.For example I can now easily add labels...

View Article

PS3 script for creating OU

I am looking for help creating a script to create an OU called "Secured Laptops" in several locations.My AD structure has OU's like this:Region > City > PCs Under PCs is Desktops and Laptops. I'd...

View Article


Setting Web Site RequestFiltering/RequestLimits/MaximumAllowedContentLength

I am trying to set the Maximum Allowed Content Length for a web site under IIS 7.5 using Powershell 2 or 3.  The only examples I have seen use appcmd ...  This is easy to do with the IIS Manager UI by...

View Article

How to update sql and add to sql

I have created a table in SQL with the following command:  (bear with me, I am a newbie and after reading powershell in a month of lunches was able to do the following command successfully   Thanks,...

View Article


VMWare Snapshots Power CLI one at a time

Greetings, I'd like help in creating a scheduled task that runs a script to take snapshots one at a time so it doesn't take up too many disk resources. I'm using PowerCLi 5.1 and ideally this script...

View Article

PowerShell help RSS feed

The updatable help in PowerShell 3.0 caused a lot of confusion when that version first shipped. The help files have been updated periodically since 3.o shipped but its always been difficult finding out...

View Article


Delete a whole lot of files from a SharePoint site with PowerShell

Here’s a little PowerShell script that you can use to delete all the files in every document library in a site:Read More

View Article

Windows PowerShell Desired State Configuration Overview

This topic describes the Windows PowerShell Desired State Configuration (DSC) feature.Read More

View Article

Windows Installer PowerShell Module 2.2.1 Released

Yesterday I released servicing update 2.2.1, which updates 2.2.0 to fix a few bugs and add a few cool new features:Read More

View Article
Browsing all 8583 articles
Browse latest View live