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

How to highlight a cell in Excel a certain color?

I found this code online and it works perfect.      $erroractionpreference = “SilentlyContinue” $a = New-Object -comobject Excel.Application $a.visible = $True $b = $a.Workbooks.Add() $c =...

View Article


Image may be NSFW.
Clik here to view.

Not reading variable properly when script run from the shell.

Hello,I think this is probably something I'm doing incorrectly.I'm doing a simple script to send an email with the Net.Mail.MailMessage class. This is because with that it's easy for me to construct...

View Article


is Powershell like Perl?

Sorry for the simple question.  Seems I can't use my Perl oneliners at work anymore... but I can use Powershell...  So before i try to learn it.... So.. can i use powershell to write one liners that...

View Article

can't delete a file

This code works when I run it against my local computer.  $packageID = Read-Host    remove-item c:\temp\tmp\remove\$packageID.*    remove-item c:\temp\tmp\remove2\$packageID.* The file $packageID.* was...

View Article

modifying mapirecipient with powershell

I would like to set the mapirecipient field from $True to $False for a contacts in Active Directory ( These are contacts and are not mail enabled) by loading the Exchange shell I can get the...

View Article


Load the Script Configuration File in Other PowerShell Tools

If you want to work with vSphere PowerCLI from another PowerShell-based tool, such as PowerShell Plus or PowerGUI, you must load the default script configuration file manually.Read More

View Article

Introducing the Pipeline and ForEach

Last month, in "Where-Object and the Pipeline," I showed you PowerShell's pipeline and the pipeline's Secret Name ($_). In previous columns, you've seen how the pipeline can let you combine two Active...

View Article

Powershell: Dell Client System Update for the SCCM & MDT Build

The DCSU is a great utility that Dell has made available to update the drivers and driver applications on Dell systems. The industry I work in requires specific drivers for specific applications, which...

View Article


Powershell: Add/Remove Program entries

Sometimes it is necessary to add an add/remove programs entry. There are instances where an application is independent and requires not installation and you want to make sure it is copied to the...

View Article


Create a log file?

I have a Powershell script I've written that "builds" a Windows 7 PC with all the accounts, apps, users, etc that we need.  Is there a simple way to create a log that lets you know all went okay?  For...

View Article

Add-Type -Path c:\scripts\validateMatches.dll failing.

I can get Add-Type -Path c:\scripts\validateMatches.vb to work with the script below but trying to reference the compiled version  fails. This script just adds a [ValidateMatches] type and is identical...

View Article

Remote powershell execution

I have a mixture of Windows 7 and XP machines that I need to setup to enable them as clients to remote execute a SQL SSIS package. The package and RDBMS is located on a Windows 2008 server. On the...

View Article

Pull MsolAccountSku info from office365

Hi,I'm trying to pull information from office365 about licence which are available. $a = Get-MsolAccountSku;$licene = @();$count=1;foreach ( $aa in $a ){        $t = ($aa.ActiveUnits -...

View Article


Searching files in Windows with Powershell

By supplesoftware Searching files in Windows with Powershell. 06Aug09. The new (well, not that new now) Windows search is way annoying, so I thought may be I could use Powershell for searching. This is...

View Article

Calling Web Services in Password Reset Server with PowerShell

Here is an example of using PowerShell script calls Authenticate, UserEnrolled and ImportAnswers. Note that the you will need PowerShell 2.0 (and not the default 1.0) installed to run the script....

View Article


Send Lync Instant Message with the PowerShell script

This script will send an Instant Message to Lync Client Contact for User.Read More

View Article

Removing Old SQL Server backup files with PowerShell

A common question that comes up during my PowerShell Restore presentation is on how to delete your old SQL Server backups after a certain period of time. This is especially important for those DBAs who...

View Article


Presentation and Demo scripts from PowerShell Backup and Restore sessions at...

Here are the Presentation and the demo scripts I was using during my SQL Server Backups and Restores with PowerShell sessions at the Birmingham and Norwich SQLRelay events.Read More

View Article

Get-Process in PowerShell 4

PowerShell v4 enables you to see the user account associated with the processRead More

View Article

Create a Scheduled Task With PowerShell

Going into the GUI and creating a scheduled task is not rocket science, and now, either is creating a scheduled task via PowerShell. There is now a ScheduledTasks PowerShell module to help with...

View Article
Browsing all 8411 articles
Browse latest View live