{"id":3914,"date":"2013-03-31T00:01:00","date_gmt":"2013-03-31T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/03\/31\/weekend-scripter-managing-dell-appassure-with-windows-powershell\/"},"modified":"2013-03-31T00:01:00","modified_gmt":"2013-03-31T00:01:00","slug":"weekend-scripter-managing-dell-appassure-with-windows-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/weekend-scripter-managing-dell-appassure-with-windows-powershell\/","title":{"rendered":"Weekend Scripter: Managing Dell AppAssure with Windows PowerShell"},"content":{"rendered":"<p><strong style=\"font-size: 12px\">Summary<\/strong><span style=\"font-size: 12px\">: Guest blogger, Mike Robbins, talks about using Windows PowerShell to manage Dell AppAssure.<\/span><\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. Guest blogger, Mike Robbins, returns today to share his experience. You can also read <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/tags\/mike+f+robbins\/\" target=\"_blank\">previous blogs by Mike<\/a>.<\/p>\n<p style=\"padding-left: 30px\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8054.wes-3-31-13-bio.jpg\"><img decoding=\"async\" title=\"Photo of Mike Robbins\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8054.wes-3-31-13-bio.jpg\" alt=\"Photo of Mike Robbins\" \/><\/a><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-size: 12px\">Mike Robbins is a senior systems engineer with almost 20 years of professional experience as an IT pro who currently works for a healthcare company located in Meridian, MS. During his career, Mike has provided enterprise computing solutions for educational, financial, healthcare, and manufacturing customers. He&rsquo;s a Windows PowerShell enthusiast who uses Windows PowerShell on a daily basis to administer Windows Server, Hyper-V, SQL Server, Exchange Server, SharePoint, Active Directory, Terminal Services, EqualLogic Storage Area Networks, AppAssure, and Backup Exec. Mike is an author of a chapter in the book <\/span><a style=\"font-size: 12px\" href=\"http:\/\/manning.com\/hicks\/\" target=\"_blank\">PowerShell Deep Dives<\/a><span style=\"font-size: 12px\">, he has presented sessions at PowerShell Saturday 003 in Atlanta, for the Mississippi PowerShell User Group, and for the Florida PowerShell User Group. Mike is also one of the cofounders of the <\/span><a style=\"font-size: 12px\" href=\"http:\/\/mspsug.com\/\" target=\"_blank\">Mississippi PowerShell User Group<\/a><span style=\"font-size: 12px\">.<\/span><\/p>\n<p style=\"padding-left: 30px\">Blog: <a href=\"http:\/\/mikefrobbins.com\/\" target=\"_blank\">Mike F Robbins Computing Solutions<\/a><br \/> Twitter: <a href=\"https:\/\/twitter.com\/mikefrobbins\">@mikefrobbins<\/a><br \/><a href=\"http:\/\/mspsug.com\" target=\"_blank\"> Mississippi PowerShell User Group<\/a><\/p>\n<p>Here&rsquo;s Mike&hellip;<\/p>\n<p>For those of you not familiar with Dell AppAssure, it&rsquo;s a backup, replication, and recovery solution. More information about this product can be found on the <a href=\"http:\/\/www.appassure.com\/\">AppAssure<\/a> website.<\/p>\n<p>It&rsquo;s no secret that I&rsquo;m a big fan of Windows PowerShell so when a third-party vendor, such as Dell, adds PowerShell support to their products, I also become very interested in those products. (I&rsquo;m not affiliated with Microsoft, Dell, or AppAssure in any way other than being a customer.)<\/p>\n<p>AppAssure added Windows PowerShell support via a Windows PowerShell module in version 5.3.1 of their product. This module named AppAssurePowerShellModule includes a total of 31 cmdlets, which are &nbsp;listed in the following image:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1067.wes-3-31-13-1.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1067.wes-3-31-13-1.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p><span style=\"font-size: 12px\">Usually most vendors are slow to support the latest and greatest version of Windows PowerShell, but not AppAssure. According to AppAssure&rsquo;s support documentation, <\/span><a style=\"font-size: 12px\" href=\"http:\/\/www.appassure.com\/support\/KB\/how-to-import-the-appassure-5-powershell-module\/\" target=\"_blank\">How to Import the AppAssure 5 PowerShell Module<\/a><span style=\"font-size: 12px\">, they prefer Windows PowerShell&nbsp;3.0, although Windows PowerShell&nbsp;2.0 is also supported. The examples found in this blog use Windows PowerShell&nbsp;3.0 syntax, which also means that the AppAssure PowerShell module doesn&rsquo;t have to be explicitly imported before using the cmdlets. If you were running Windows PowerShell&nbsp;2.0, you would need to import the AppAssure PowerShell module by using the following command prior to attempting to use any of the cmdlets:<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6545.wes-3-31-13-2.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6545.wes-3-31-13-2.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>In the previous example, <strong>Name<\/strong> is a positional parameter which can be omitted if the first item specified after <strong>Import-Module<\/strong> is the name of the Windows PowerShell module.<\/p>\n<p>From what I&rsquo;ve seen in the industry, the average IT pro isn&rsquo;t using Windows PowerShell yet. Hopefully that will soon change with more third-party vendors adding Windows PowerShell integration to their products and with cmdlets (such as those in the AppAssure PowerShell module) being so easy to use. Most of the cmdlets in the AppAssure PowerShell module require only opening Windows PowerShell on the AppAssure core server and running the cmdlet with no parameters or with very few mandatory parameters being required.<\/p>\n<p>The <strong>Get-ProtectedServers<\/strong> cmdlet is a perfect example of this. It returns all of the servers that are protected by the AppAssure core server that you&rsquo;re currently logged in to without specifying anything other than the cmdlet name. The information provided includes the server names, status, AppAssure agent version, and a few other properties:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5707.wes-3-31-13-3.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5707.wes-3-31-13-3.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>Wasn&rsquo;t that much easier and more efficient than using the GUI to retrieve this information? Grouping the protected servers to determine how many are listed for each version, or returning a list that is grouped by version (including the names of the protected servers for each version) are also easy tasks when using Windows PowerShell:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3175.wes-3-31-13-4.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3175.wes-3-31-13-4.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>I&rsquo;ve found something that it is difficult to determine in the AppAssure GUI. When I start replicating protected servers to another AppAssure core server, and I choose to initially seed the transfer via SneakerNet, how do I know when the seeding of the protected server to the portable media device is complete?<\/p>\n<p>This is something that&rsquo;s very important. Disconnecting it from the source AppAssure core server and shipping it to the site where the destination AppAssure core server resides, before the seeding process has completed, could cause the protected servers to not be replicated, not have a replicated base image, or have an orphaned chain of recovery points. Determining the seed drive progress for each protected server that you&rsquo;ve chosen to replicate to a remote AppAssure core server is also easy to determine with Windows PowerShell as shown in the following example:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3010.wes-3-31-13-5.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3010.wes-3-31-13-5.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>I&rsquo;m not really a big fan of logging on to a server via a remote desktop to manage it. In the following scenario, I use the <strong>New-PSSession<\/strong> cmdlet to create a persistent connection to three AppAssure core servers. Two of the servers are in different Active Directory forests than the Windows 8 workstation where I am running the commands. Each of these AppAssure core servers requires different credentials than those I&rsquo;m currently using on my workstation and to run Windows PowerShell. They also each require different credentials than the others:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7380.wes-3-31-13-6.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7380.wes-3-31-13-6.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>According to the previously referenced AppAssure article, <a href=\"http:\/\/www.appassure.com\/support\/KB\/how-to-import-the-appassure-5-powershell-module\/\" target=\"_blank\">How to Import the AppAssure 5 PowerShell Module<\/a>, the module shouldn&rsquo;t be imported on a non-AppAssure core server. This is why I don&rsquo;t have the AppAssure Windows PowerShell module installed on my local workstation. Using the Windows PowerShell <strong>Invoke-Command<\/strong> cmdlet allows us to remotely manage multiple AppAssure core servers while staying within the recommended supported configuration for using their Windows PowerShell module.<\/p>\n<p>Now I can use a single Windows PowerShell command to check the status of all the protected servers in the three datacenters, which have an AppAssure core server. I want to know if any of the servers that are supposed to be protected by AppAssure aren&rsquo;t being protected:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6712.wes-3-31-13-7.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6712.wes-3-31-13-7.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>Based on the results in the previous example, I have one server out of all the protected servers in all three datacenters that has a status of <strong>unreachable<\/strong>. This doesn&rsquo;t seem too impressive until you factor in that the three datacenters have a total of 53 protected servers:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5047.wes-3-31-13-8.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5047.wes-3-31-13-8.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>With that many servers, it&rsquo;s easy to see how efficient it is to use this Windows PowerShell command rather than using the AppAssure GUI (web) interface. It took a total of 1 minute and 25 seconds to query the three AppAssure core servers for the status on all 53 protected servers:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6014.wes-3-31-13-9.jpg\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6014.wes-3-31-13-9.jpg\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>Two of the AppAssure core servers and twenty-two of the protected servers in the previous example reside at remote datacenters that are connected via a VPN across the Internet (not on the LAN).<\/p>\n<p>We&rsquo;ve only looked at one of the cmdlets provided in the AppAssure PowerShell module in this blog, but there&rsquo;s much more that can be done with Windows PowerShell when it comes to managing AppAssure. Want to protect a new server? That&rsquo;s what the <strong>Start-Protect<\/strong> cmdlet is for. Want to pause the AppAssure replication between AppAssure core servers during business hours and resume it after business hours due to bandwidth constraints?<\/p>\n<p>That&rsquo;s what the <strong>Suspend-Replication<\/strong> and <strong>Resume-Replication<\/strong> cmdlets are for. This is also where Windows PowerShell&nbsp;3.0 comes in handy. You could use Windows PowerShell to set up scheduled tasks that run Windows PowerShell commands to pause and resume the replication. I wrote a blog about that very subject last month: <a href=\"http:\/\/mikefrobbins.com\/2013\/02\/07\/use-powershell-to-create-a-scheduled-task-that-uses-powershell-to-pause-and-resume-appassure-core-replication\/\" target=\"_blank\">Use PowerShell to Create a Scheduled Task that Uses PowerShell to Pause and Resume AppAssure Core Replication<\/a>. It demonstrates this process, if it&rsquo;s something of interest.<\/p>\n<p>There is also an AppAssure event log added to the AppAssure core server during installation of the product that contains an abundance of information that can be queried by using Windows PowerShell&mdash;as you would any other event log.<\/p>\n<p>Where can we find more information about Managing Dell AppAssure with Windows PowerShell? In the <a href=\"http:\/\/docs.appassure.com\/display\/AA50D\/AppAssure+5+Technical+Documentation\" target=\"_blank\">AppAssure 5 Technical Documentation<\/a> section of the AppAssure website, there&rsquo;s an <em>AppAssure 5 PowerShell Reference Guide<\/em>. You could also view the Help for the cmdlets contained in the AppAssure PowerShell module. If you&rsquo;re interested in more blog posts about using Windows PowerShell to manage Dell AppAssure, see the <a href=\"http:\/\/mikefrobbins.com\/category\/appassure\/\" target=\"_blank\">AppAssure category<\/a> on my site, <a href=\"http:\/\/mikefrobbins.com\/\">Mike F Robbins Computing Solutions<\/a>.<\/p>\n<p>I would also like to invite you to join us on the second Tuesday of each month at 8:30 PM Central Time for the <a href=\"http:\/\/mspsug.com\/\">Mississippi PowerShell User Group<\/a> meetings. These meetings are held online (virtual) via Microsoft Lync. Anyone from anywhere can join in and learn more about Windows PowerShell from our awesome line-up of speakers that we have scheduled throughout 2013. Each of our guest speakers for the remainder of this year is an author of at least one chapter in the book <a href=\"http:\/\/manning.com\/hicks\/\" target=\"_blank\">PowerShell Deep Dives<\/a>.<\/p>\n<p>~Mike<\/p>\n<p>Awesome blog post, Mike. Thank you so much for taking the time to share your experience with us.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><strong>Ed Wilson, Microsoft Scripting Guy<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Guest blogger, Mike Robbins, talks about using Windows PowerShell to manage Dell AppAssure. Microsoft Scripting Guy, Ed Wilson, is here. Guest blogger, Mike Robbins, returns today to share his experience. You can also read previous blogs by Mike. Mike Robbins is a senior systems engineer with almost 20 years of professional experience as an [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[343,423,51,56,344,3,4,61,45],"class_list":["post-3914","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-backup","tag-backup-and-system-restore","tag-getting-started","tag-guest-blogger","tag-mike-f-robbins","tag-scripting-guy","tag-scripting-techniques","tag-weekend-scripter","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Guest blogger, Mike Robbins, talks about using Windows PowerShell to manage Dell AppAssure. Microsoft Scripting Guy, Ed Wilson, is here. Guest blogger, Mike Robbins, returns today to share his experience. You can also read previous blogs by Mike. Mike Robbins is a senior systems engineer with almost 20 years of professional experience as an [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/3914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=3914"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/3914\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=3914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=3914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=3914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}