title: How do I install the SQL ASCMDLETS module?
body: <p>Ultimately trying to run Invoke-ASCmd in an Azure VM (Win Server 2012 R2)running SQL Server 2016.</p>
  
  <p>When I run Import-Module ASCMDLETS I get the error: "no valid module file was found in any module directory"</p>
  
  <p>It seems the .dlls should be created in the C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLASCMDLETS folder, but I only have a \SQLPS folder.</p>
  
  <p>From SQL Server Management Studio 17 onwards, the SQL Server PowerShell module is installed separately, however after following the steps here: <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-ps-module" rel="nofollow noreferrer">Microsoft Docs</a>. Even after doing the Install-Module -Name SQLServer I still did not get the relevant files so I could then Import-Module SQLASCMDLETS</p>
  
  <p>I've installed SSMS and all client tools in the SQL Server installation. Still not there, where do I get it?</p>