The term 'Get-SPWeb' is not recognized as the name of a cmdlet
search cancel

The term 'Get-SPWeb' is not recognized as the name of a cmdlet

book

Article ID: 248954

calendar_today

Updated On:

Products

Data Loss Prevention Network Discover

Issue/Introduction

You're attempting to set up SharePoint scans without using the SharePoint Solution connector, following the Online Help Enabling SharePoint scanning without installing the SharePoint solution powershell script to enumerate the SharePoint sites to be scanned, and you get the error: "The term 'Get-SPWebApplication' is not recognized as the name of a cmdlet, function, script file, or operable program.  Check the spelling of the name, or if a path was included, verify that the path is correct and try again."

 

 

Cause

The PowerShell module is not being imported into the PowerShell console.

Resolution

You can add the module by running: 'Add-PSsnapin Microsoft.SharePoint.Powershell'

After adding the snapin, you can run the powershell script without getting the cited error.