Category Archives: PowerShell

Create the Optimize Database Solution using PowerShell and dbatools

As a follow on to a frequently referenced, and still accurate blog post: Optimizing SCCM Databases Revisited – Let’s automate the creation of this optimization solution using PowerShell and DBATools. Let’s get building! If you have not used dbatools, read … Continue reading

Posted in DBA, PowerShell, SQL Server | 6 Comments

TSQL2sday #94–SQL Server and PowerShell

T-SQL Tuesday (#tsql2sday), I’ve been absent for a few, figured it was time to jump back in! SQL and PowerShell, what a great combination. First, let me thank the sponsor, you can find his site from the following link. One … Continue reading

Posted in PowerShell, SQL Server | Leave a comment

Use PowerShell to Install Server 2012 roles and features for CM

Using PowerShell to install the Server 2012 roles and features for Configuration Manager is really super easy. Discovered an issue installing several features as the script needed access to the server 2012 source. Open PowerShell as an administrator, modify the … Continue reading

Posted in ConfigMgr, PowerShell, Server 2012 | 1 Comment

SCU 2015 – Top 10 ConfigMgr 2012 Issues – SQL Content Links

Kent Agerlund and Johan Arwidmark; aka Robin and Batman (below) presented a great list of top 10 ConfigMgr 2012 Issues at the System Center Universe 2015 event in Irving, TX. Appreciated the shout out to my blog for a few … Continue reading

Posted in ConfigMgr, PowerShell | Leave a comment

PowerShell – SQL Audit Script

  As demonstrated at TechEd 2014, here is the PowerShell script. Actually there are two scripts. The first script is contained in this page, copy/paste (as Johan says ‘steal with pride’ 😉 and name the first: ‘SQLAuditv02.ps1’ The second was … Continue reading

Posted in PowerShell, SQL Server, TechEd 2014 | 20 Comments

TechEd 2014 – MVP Experts Panel

On Monday, May 10 2014, 5 MVPs presented at TechEd. I had the privilege of appearing on stage with Greg Ramsey, Jason Sandys, Johan Arwidmark and Kent Agerlund. Session bio: In this session, Configuration Manager MVPs demonstrate how to take … Continue reading

Posted in ConfigMgr, PowerShell, Server 2012, TechEd 2014 | Leave a comment

Running Powershell as an SQL Server Agent task

In my prior post about Using Powershell to automate SQL Server database restore, I mentioned a follow-up post on setting this up. It actually worked fine, until I  upgraded SQL Server 2008 R2 to SQL 2012. Then it broke. More … Continue reading

Posted in PowerShell, SQL, SQL Server | 2 Comments

Using a PowerShell Script to automate SQL Server database restore

  Recently we moved our remote ConfigMgr 2012 database to our site server. The plan was to leave the existing remote server in place to support the “ad hoc” users. Now, how to refresh that database on a daily basis? … Continue reading

Posted in ConfigMgr, PowerShell, SQL Server | 2 Comments