January 15, 2012 8:00 AM
Posted by: Colin Smith
Powershell,
Scripting,
SMOThis is a function that I keep in my profile so I can call it in any of my scripts that will run from my profile. It makes it easier for me so it might for you.
function connect-sql ($arg)
{
if($arg -eq $null)
{
$server = Read-Host "enter instance name to connect to"
}
else
{
$server =...
June 1, 2011 7:49 PM
Posted by: Colin Smith
IT Pros,
Powershell,
ScriptingI found this article today and I thought I should mention it and then post a bit about some of the comments that I see. So go check out the article at Redmondmag.com and also read the...
January 29, 2011 8:00 AM
Posted by: Colin Smith
Formatting,
Powershell,
Scripting,
Training,
WebcastI did not get to see this during the live presentation but I am looking forward to seeing it especially after hearing some co-workers talk about it. If you have the time check it out. I am sure it is going to be great.
November 24, 2010 6:52 PM
Posted by: Colin Smith
Add new tag,
DBA,
Powershell,
ScriptingI recently had a request to go out and find the logical name and the physical name of mdf and ldf files in sql server. I thought this might be a good place to use powershell and the invoke-sqlcmd cmd-let that is with sqlserver2008 snapin.
Here is an example of what I did to find the files for...
November 23, 2010 7:05 PM
Posted by: Colin Smith
Filesystem,
Managment,
Powershell,
ScriptingI recently needed to find all files in a specific directory that had been written to after a specific date. I also wanted to include all subfolders in the search. I decided to use Powershell to do this and man was it simple. First you have to define the date that you are looking for and you have to...
October 28, 2010 11:00 PM
Posted by: Colin Smith
Database Monitoring,
Monitoring,
Powershell,
ScriptingI am getting back into writing my monitoring application in powershell and I have made some progress over the last few days. I have figured out my issue with getting the backup dates and times inserted into my monitoring database and also not entering the information multiple times if I already...
October 28, 2010 9:58 PM
Posted by: Colin Smith
Formatting,
Powershell,
ScriptingI am working on a script that accepts some user inputs and then echos that back to the user for validation. For this I wanted to make the text that the user submitted be in RED so that it would stand out and make it more readable.
I was looking for a way to use this doing echo and echo is an...
October 5, 2010 9:47 PM
Posted by: Colin Smith
Exchange Scripting,
Powershell,
ScriptingSorry for the long delay in posts but I have been moving and it is a mess. We purchased a prevously owned home and I will never do that again. New is the only way to go. But now that we are settling in and things are starting to wind down I love the house. Still a ton to do though.
Anyway back...
August 30, 2010 10:00 AM
Posted by: Colin Smith
Exchange Scripting,
Powershell,
ScriptingNow that I have both the users stored in an array and the mailboxes stored in another array it is time to start making sure that I am working with a mailbox and a user account that match up. I do not want to look at my user account and Johns Mailbox and start making changes based on what I find in...