Monthly Archives: November 2009

Sample Creating PowerShell SQL Agent Jobs

  With the introduction of SQL Server 2008, Microsoft SQL Server Team introduce SQLPS.exe.   SQLPS.EXE mini-shell is based on PowerShell v 1.0 and includes the SQL Server provider and snapins.  Also, SQL Server 2008 setup will install the SMO (SQLServer … Continue reading

Posted in Uncategorized | 3 Comments

QuickBlog: Get SQL Server LOGINS using SQLPS…

SQLPS.exe (PowerShell mini-shell) means business.  You want a quick way to get information about your SQL Server logins, then here it is: 1: cd SQLServer:\SQL\YourSQLServer_Name\Default_or_YourSQLinstance_Name\Logins 2: dir TWO LINES…. is that GREAT!!   The more you discover how productive PowerShell can … Continue reading

Posted in Uncategorized | Leave a comment

Begin to extend SQL Server 2008 (SQLPS) with PowerShell V2

for the last 1.5 year, in all my “PowerShell and SQL Server” presentations, I have shown some basic samples on how to use both technologies together.  Let me be clear, in SQL Server 2008(including R2), SQLPS.exe is a PS mini-shell … Continue reading

Posted in Uncategorized | 1 Comment

QuickBlog: Use PowerShell/SQLPS to get SQL Agent Jobs statuses…

Here’s another few PowerShell short script to be executed under SQLPS.exe and/or if you already have the SQL Server provider loading on your WindowsPowerShell folder under your user profile. Look for the script “Microsoft.PowerShell_profile.ps1”. Requirement to run script: 1. Must … Continue reading

Posted in Uncategorized | Leave a comment

Windows Home Server with PowerShell V2

I always was curious about Windows Home Server (WHS) and during a Microsoft LiveMeeting on WHS with Jonas Svensson talked about wanted to see some  PowerShell in WHS.  Well, here’s a start. I’m showing my Windows 7 (64bit) using Windows … Continue reading

Posted in Uncategorized | Leave a comment

QuickBlog: PowerShell – Extracting email … to use COM Object or .NET code…

As you have notice with my previous sample COMObject vs .NET, that is looks the same.  So, as one of the PowerShell MVP college (Marco Shaw) pointed out on an email to me, that “… .NET just wrapped COM for … Continue reading

Posted in Uncategorized | Leave a comment

QuickBlog: PowerShell – Extracting email from Outlook but using .NET code…

In my previous QuickBlog I show a sample code of extracting email from Outlook but I was using COM object “Outlook.Application”.  Well, here’s the same code but using .NET “Microsoft.Office.Interop.Outlook” assembly.  The code look the same: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Outlook")$o = New-Object Microsoft.Office.Interop.Outlook.ApplicationClass$getmail … Continue reading

Posted in Uncategorized | Leave a comment