Problem
You receive below error executing PowerShell command/script while connecting to SharePoint site.The term 'Get-SPweb' 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.
At line:1 char:10
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-SPWeb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
⛏️ How to fix ?
The Site Url seems to be correct, so there is no problem with the script.⚡️ SharePoint Management Shell
You need to start PowerShell as "Run as administrator"
⚡️ Windows PowerShell Console
If you directly run this PowerShell command from Windows PowerShell Console, the PowerShell module is not auto imported in console. Execute below command and then load the script.Add-PSSnapin Microsoft.Sharepoint.Powershell
$spWeb = Get-SPWeb "[SharePoint Site link]"
⚡️ Windows PowerShell ISE
Execute below command and then load the script.Add-PSSnapin Microsoft.Sharepoint.Powershell
$spWeb = Get-SPWeb "[SharePoint Site link]"
⚡️ SharePoint Online Management Shell
Get-SPWeb cmdlet is applicable only for SharePoint on-premise and will not work for SharePoint Online.Refer PowerShell SharePoint Online commands or PnP PowerShell commands for working with SPO.
Get-SPOSite -Identity [SharePoint Online Site link]
More Posts related to SharePoint,
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly
- How to generate client id and secret to register SharePoint App with OAuth
- Create SharePoint Site Collection with new Content database in existing web application
- Fix Error 2711 SQL RBS client - The installer has encountered an unexpected error. The specified Feature name ('Docs') not found in Feature table
- How to exclude results from SharePoint Search
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- [Solved] SharePoint Access Denied error editing Document Name
- Recommended size and resolution for SharePoint Online Site logo
- SharePoint Server 2016 IT Preview - new improved Features and Enhancements
- Restore deleted Office 365 SharePoint group site
- SharePoint An unexpected error has occurred - Correlation ID and PowerShell Merge-SPlogfile
- [Solved] SharePoint Search Internal server error exception
- SharePoint CAML query error - The XML source is not correct
- How to hide quick launch in SharePoint classic site
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- Fix Power BI error Access to the resource is forbidden when connecting SharePoint Online List as data source
- [Fix] Restricted View permission level missing in SharePoint Online site library
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- How to create classic site in SharePoint Online
- That did'nt work, Issue type User not in directory - SharePoint external access error
- Merge-SPlogfile PowerShell - SharePoint Correlation ID error
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- SharePoint Server 2016 IT Preview Deprecated Removed features
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
More Posts:
- PHP drag and drop file upload tutorial using dropzone.js - PHP
- How to Word wrap eclipse console logs width - Eclipse
- How to ls command to output one entry per line [macOS/Linux/Bash] - Linux
- Sublime Text 3 spell check shortcut - Sublime
- Replace new line with comma in Sublime Text Editor - Sublime-Text
- How to write hello world different languages syntax - HowTos
- Graph API error when querying BookingBusinesses - ErrorExceededFindCountLimit, The GetBookingMailboxes request returned too many results - Microsoft
- Bash command to wait for seconds - Bash