Monthly Archives: April 2011

Download: Powershell a Day -April 2011

Powershell a day – april 2011 blog series, where every day I wrote a blog for complete April month about powershell, you can download the consolidated pdf file which contains all the 30 days blog post. Download : Powershell a … Continue reading

Posted in Free Stuff, Powershell | Tagged | 2 Comments

Powershell Day 30

Day 30 Best Practice Having good Security is first best practice for any language no exception with Powershell. Having that we should also we try to follow following best practices. *Best practice is not always best. It may vary depends … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 29

Day 29 Advance Security As discussed in earlier blog about “Security” Day 7. Continue on that we will discuss here -what all security features Powershell provides. How to use them. Security is good but securing the things without using is … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 28

Day 27 SQL Policy I highly recommand you all to go through the Policy –based management (BCM)’s official site to learn more about PBM http://blogs.msdn.com/b/sqlpbm/   Introduction:- Policy-Based Management (PBM).is introduced from sql server 2008 onwards. Policy means making a … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 27

Day 27 Inventory   As discussed ealier about wmi, wmi is a good for accessing inventory data from remote system as: To get the Operating related information win32_OperatingSystem :OS info PS C:\> get-wmiobject win32_OperatingSystem –computername “servernm” Or PS C:\> get-wmiobject … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 26

Day 26 Generate script Generate script for sql server objects is very simple, there are different ways we can generate the sql server objects includes – database, table, trigger, stored procedure… using SqlPS –MiniShell: We have already discussed about mini … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 25

Day 25 RMO   I have observed that no body has written anything about RMO. And replications is one of my favoriate topic, so tried to write this blog. Please DO NOT TRY THIS SCRIPT ON PRODUCTION, I AM NOT … Continue reading

Posted in Replication | Tagged | Leave a comment

Powershell Day 24

Day 24 Performance Monitor  Sql Performance:  ❑ performance counters  sys.dm_os_performance_counters ❑ Top ten queries from sys.dm_exec_query_stats and sys.dm_exec_sql_text ❑ Processor: sys.dm_os_schedulers ❑Memory : sys.dm_os_memory_clerks  Performance counters using WMIobject: Formatted Data ❑get-wmiobject  Win32_PerfFormattedData_PerfDisk_PhysicalDisk ❑get-wmiobject  Win32_PerfFormattedData_PerfOS_Memory ❑get-wmiobject  Win32_PerfFormattedData_PerfOS_Processor ❑get-wmiobject  Win32_PerfFormattedData_PerfProc_Process ❑get-wmiobject  Win32_PerfFormattedData_Tcpip_NetworkInterface … Continue reading

Posted in Powershell | Tagged | Leave a comment

Powershell Day 23

Day 23 SMO programming Part 4  AS we can work with Server, Database,  Table, Column. You can get the similar information about Views, Storedprocedures… $database1.Views $database1.Storedprocedures $database1.logfiles $database1.rules $database1.schemas $database1.roles $database1.triggers $tables1.triggers If you observed on this, cmdlets are always … Continue reading

Posted in Powershell | Tagged | 1 Comment

Powershell Day 22

 Day 22 SMO programming Part 3 In earlier blog we have discussed about server and database classes, using table clase you can create a table with different options.  Table class also require support of other classes like “Datatype” class and … Continue reading

Posted in Powershell | Tagged | Leave a comment