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

re-name word documents from sql data base using Powershell

Hello, I am trying to use a Powershell script to use the account number in a file name and re-name with the ID number from a sql database. Below is the code I am using to attempt this and I am not...

View Article


Can someone help me edit the script

The following script is supposed to give me disk space usage on my serverlist  in a nice html format. But it does not work.  Here's the script. I truly appreciate your help.. #requires -version 2.0...

View Article


LastWriteTime

Does someone have an example on how I can conmpare files in two remote shares by the LastWriteTime property?...maybe by using the Get-ChildItem cmdlet? 

View Article

How to connect machines remotely using AD credentials

Hi,I'm trying to create a tool for connecting remote machines using Active Directory credentilas. Here is the flow I designed,1. Connect Active directory from any machine using DC's credentials2. List...

View Article

Is there a way to set a time limit on an individual powershell command

Hello Allwhen doing the following type of thing $ErrorActionPrefference="Continue"foreach ($Computer in $Computetlist) {try {get-wmiobject win32_bios -computername $computer}catch {some code here}}I...

View Article


Can I get a script to check for cpu load remotely

Hey can I get a script to get cpu load for about 10 seconds on maybe three remote servers....?

View Article

Ping once every 5 seconds

ping computername /t | % {$_; Start-Sleep -Seconds 5}  Does this command send a ping once every 5 seconds to the computer? Or dose the "ping computername /t" keep going then feeds the data to the...

View Article

Why can't I execute a sql script like this after installing sql server 2012?...

I have an existing process built to take 2 sql script repos, build databases, compare schemas and data and produce an upgrade script.  I use powershell, tsql, and Idera compare toolset to do this....

View Article


Image may be NSFW.
Clik here to view.

Passing Arguments against scripts to find reserved characters

First, thanks to Don Jones and the community! Fair warning... I'm still a n00b when it comes to powershell.... still learning.. So if I have spaghetti code, my apologies.What I'm trying to accomplish...

View Article


Using Sql to perform windows update and schedule server reboots

I would like to use a sql database to query the reboot time of a computer and based on that info, perform windows update and reboot the server. The reason of using sql is for each computer may have...

View Article

PowerShell Script Wakes Remote Machines as a PowerShell Function

Q: Do you have a version of your Windows PowerShell script to wake remote machines as a PowerShell function? A: I took my PowerShell script from my FAQ "How Can I Easily Send a Magic Packet to Wake a...

View Article

PowerShell Module Automatic Load in Windows 8 and Server 2012

Q: Why, even though no module was loaded in my Windows 8 and Windows Server 2012 PowerShell session, did a cmdlet from the module still work? A: Typically to use cmdlets from a module, that module must...

View Article

send-mailmessage cmdlet, Error variable and type of exceptions

Hi, In a script (in powershell 2.0) i use send-mailmessage cmdlet , and log errors in log file.Smtp server, recipient, sender are parameters of my script.I execute the cmdlet send-mailmessage using the...

View Article


Automating SharePoint 2010 Administration with PowerShell: Cleaning up...

How about getting rid of all those Backups that has failed? They are just sitting there doing nothing useful anyway.Read More

View Article

SVN and Powershell -HELP

Hi,I need to integrate with SVN from Powershell and get latest check in logs. Please send me know any resources in Web to get started.Thanks.

View Article


passing variable between scripts issue - not working in batch file - Help

Hi, This is working from running PS1 but not working when running PS1 from batch file:sprint2.ps1:-----------Set-StrictMode -Version Latest$var1main=""$var1=""if ($var1main -eq $var1)...

View Article

Very New to PS

Hi GuysI'm very new to PS and don't have any programming experience at all - is there anything out there to help a complete novice with no experience understand the actual language as well as the PS...

View Article


PowerShell 3 Web of Wow, Part 1

When PowerShell 3 came out along with Windows Server 2012 and Windows 8, you probably heard a lot of talk about the cloud and how to manage within it. In this week's lesson we'll start a short series...

View Article

SCCM 2012 SP1 – Welcome PowerShell on board!

I don't know how about you, but for me PowerShell is the only reason to migrate from SCCM 2007 to SCCM 2012. As an old-school SMS and SCCM admin I am not sure about user-centric distribution. Let's say...

View Article

File Server Management with Windows PowerShell

Managing file servers can be a tedious and thankless task for many IT pros. But it doesn't need to be that way. By incorporating Windows PowerShell, you can easily get a handle on shared file resources...

View Article
Browsing all 8583 articles
Browse latest View live