how to connect sqlserver using powershell

how to connect sqlserver using powershell
Here we can find the script the way we can connect sqlserver DB using PowerShell.

$con = New-Object System.Data.SqlClient.SqlConnection
$con.ConnectionString = "Server=servername;Database=databasename;User ID=username;Password=password;"
$sql = "your select query"
$cmd = New-Object System.Data.SqlClient.SqlCommand($sql,$con)
$rdr = $cmd.ExecuteReader()
$test = @()
    $test += ($rdr["fieldname"].ToString())
#here we can see the output using

Write-Output $test

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

how to send email with attachment in powershell

how to send email with attachment in powershell
$Body = "get the information here to show the data with attachement"  | Set-Content C:\somename.html

$file = "C:\somename.html"
$EmailFrom = ""
$EmailTo = ""
$SMTPServer = "Your Smtp Server Name"
$EmailSubject = "Enter Your Subject"
$att = new-object Net.Mail.Attachment($file)

#Send mail with attachment
$mailmessage = New-Object
$mailmessage.from = ($EmailFrom)
$mailmessage.Subject = $EmailSubject
$mailmessage.Body = $Body
$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer)
SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

How to send email using powershell in sharepoint

How to send email using powershell in sharepoint
Here we can see the script,the way we can sent mail alerts using power shell

$EmailFrom = ""
$EmailTo = ""
$SMTPServer = "YourSmtpServerName"
$EmailSubject = "Enter your Subject you want"

$mailmessage = New-Object
$mailmessage.from = ($EmailFrom)
$mailmessage.Subject = $EmailSubject
$mailmessage.Body = "Email body"
#if we are sending any html body we have to use below line
$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer)
#if you want any network credentials set user name and password.
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("username", "password");

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

How to add extra name infront of Newsfeed(SuiteBarLeft) in SharePoint 2013

    In SharePoint 2013, we can easily add text  in-front of Newsfeed (SuiteBarLeft) in top right side by customizing the master page.

Now we are going to add text(Lakshmi) by using master page, Navigate to SharePoint Designer
  •  Open your SharePoint site what you want...
  •  Click on All Files in left side ->_catalog -> masterpage
  •  I am using default master page Seattle.master, going customizing Seattle.master page. Right click on it Check out and Edit file in Advance mode.
  •  Search for "DeltaSuiteLinks" and add the following code in below as shown in figure.
   <span id="idtextds" class="classtextds">
     <a href="">
       <asp:Label ID="lblds" runat="server" Text="Lakshmi"></asp:Label>

Save and Check In the master page , now we can it as shown below

SharePoint 2013 Administration Course Detail

SharePoint 2013 Administration Course Detail
                                  SharePoint 2013 Administration

 Getting started with SharePoint 2013 

  • SharePoint Foundation Architecture 
  • SharePoint 15 Product SKUs 
  • What's New in SharePoint 2013 
  • Windows PowerShell Primer 

 Installing SharePoint Server 2010 
  •  Hardware Requirements 
  •  Installing Prerequisite Software 
  •  Creating Dedicated Service Accounts 
  •  Installing SharePoint Server 2013 
  •  Creating the Farm and Configuration Database 

 Topology and Configuration 
  •  Understanding Farm Topologies 
  •  Configuring Managed Accounts 
  •  Managing Timer Jobs 
  •  Creating and Configuring Service Applications by hand 
  •  Creating and Configuring Service Applications using PowerShell 

Configuring Security and User Authorization 
  •  The Fundamentals of Claims-based Security 
  •  Configuring Integrated Windows Authentication with Kerberos vs. NTLM 
  •  Configuring Forms-based Authentication (FBA) 
  •  Outsourcing User Management to External Identity Providers such as Windows Live 
  •  Configuring a Trust to the Windows Azure Access Control Service (ACS) 

 Creating and Configuring Web Applications 
  •  Creating New Web Applications 
  •  Configuring Web Application 
  •  Managing Content Databases 
  •  Creating Site Collections 
  •  Configuring Self-service Site Collections 

 Managing Site Collections and Tenancies 
  •  Site Templates 
  •  Capacity Planning 
  •  Site Collection Security 
  •  Understanding Tenancies 
  •  Configuring Subscriptions 

Business Connectivity Services 
  •  BCS Architecture External Data Sources 
  •  Creating and Configuring External Contents Types 
  •  Configuring Profile Pages and External Lists 
  •  BCS Enhancements involving OData Support 

 The Managed Metadata Service 
  •  Overview of the Managed Metadata Service 
  •  Enhancement to the Managed Metadata Service in SharePoint 2013 
  •  Creating and Managing Term Sets, Terms and Taxonomies 

 Working with Document Sets 
  •  Configuring a site collection as a Content Type Publishing Hub 
  •  Using The Secure Store Service to configure Advanced Authentication Techniques 

 Configuring the User Profile Service 
  •  Overview of User Profiles and Social Networking 
  •  Create and Configuring a User Profile Service Application (UPA) 
  •  Create and Configuring The User Profile Synchronization Service (UPS) 
  •  Creating and configuring Audiences 
  •  Creating and Managing My Sites 
  •  Understanding User Task Synchronization using the Work Management Service 

  •  Configuring a Search in SharePoint 2013 
  •  The New Unified Search Architecture of SharePoint 2013 
  •  Creating and Configuring Content Sources 
  •  Understanding the Content Processing Pipeline 
  •  Introduction to Result Sources, Result Types and Query Rules 
  •  Working with Managed Properties 

Health Monitoring and Optimization 
  •  The Developer Dashboard 
  •  Working with ULS Logs 
  •  The Logging Database 
  •  Health Analyzer and Usage Reporting 
  •  Timer Jobs and Server Affinity 
  •  The New Request Manager in SharePoint 2013 

 Deploying and Monitoring Custom Solutions 
  •  Deploying and Managing Farm solutions and Sandboxed Solutions 
  •  Introduction to the new SharePoint App Model 
  •  Configuring SharePoint App Authentication using OAuth 
  •  Configuring SharePoint App Authentication using Server-to-server (S2S) Trusts 

 Preparing for Backup, Restore, and Disaster Recovery 
  •  Versioning and Restoring Documents 
  •  Configuring Recycle Bin Behavior 
  •  Backup and Restore of site collections, Content Database and Farms 
  •  Preparing for Disaster Recovery 
  •  Recovering the Farm After Server Failure 

 Upgrading Content from SharePoint 2010 to SharePoint 2013 
  •  Upgrade Concepts and Terminology 
  •  Deprecated Upgrade Techniques from SharePoint 2010 
  •  Preparing for Database Attach 
  •  Migrating Content 
  •  SharePoint 2010 UI Mode versus SharePoint 2013 UI Mode 

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

The workbook cannot be opened sharepoint 2013

I am trying to open the Excel WorkBook(.xslx) in the browser I am getting the error like this

So now I started to resolve this issue checked weather that particular user having DB Permissions or not.
We have to give db_owner Permissions to that particular user in SQL Server.
Login to DB->Security->Logins->
If user is already there check the Server roles and User Mapping Permissions.
In User mapping we have to give access to SharePoint Content DB as “db_owner”.
Once we give Permissions Check it will work.
We give Permissions using Power Shell Commands also

$p =Get-SPWebApplication –Identity<Url of the Webappliction>

Even though if you are having the same issue
Configure diagnostic logging
Central Admin->Monitoring->Configure diagnostic logging
Select the Check box for Excel Services and Check the Logs

Find with text “Error” you can find the correct error.

The attempt to create a page from that document failed with the following error: Converting the document to a page failed. The converter framework returned the following error: CE_BACKENDUNAVAILABLE

The attempt to create a page from that document failed with the following error: Converting the document to a page failed. The converter framework returned the following error: CE_BACKENDUNAVAILABLE
In CentralAdmin->System Settings->manage services on server

Stop the Document Conversion Launcher Service
Stop the Document Conversion Load Balancer Service

Start the Document Conversion Load Balancer Service
Start the Document Conversion Launcher Service

Make sure that document conversion services always start in a proper order.

Backup and Restore SharePoint 2013 site collection using PowerShell

Backup and Restore SharePoint 2013 site collection using PowerShell
If you want to take backup/restore your site collection in SharePoint, we can do with PowerShell Commands.

Backup site collection in SharePoint using PowerShell

Backup-spsite  -Identity sitecollectionname  -path location to store the back up

Backup-spsite  -Identity http://dotnetsharepoint  -path C:\TestBackup.bak

Restore site collection in SharePoint using PowerShell

Restore-SPSite -Identity create new site collection -path location to restore the back up

Restore-SPSite -Identity http://CreatNewSiteCollection -path C:\TestBackup.bak

SharePoint 2013 Product configuration wizard failing at step 9/10

SharePoint 2013 Product configuration wizard failing at step 9/10
When we are tried to run the Configuration wizard, after installing the Patches.
In Some cases we can get failing at step 9/10.
Clear the Cache.ini
Go to Location C:\ProgramData\Microsoft\SharePoint\Config
Now we can able to see the GUID’s
In Right hand side Corner top Search like cache.ini
Open the cache.ini and reset the value to 1
Run the Command stsadm -o execadmsvcjobs
After that finally run
Psconfig.exe -cmd upgrade -inplace b2b -wait -force


.Net Interview Questions add custom button in sharepoint using javascript Add custom column property into a PageLayout in SharePoint Add Page Title on their browser's title bar in SharePoint Customly add zip files in blogger Add-SPOSiteCollectionAppCatalog : Must have Manage Web Site permissions or be a tenant admin in order to add or remove sites from the site collection app catalog allow list Advance SmartObject An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. Angular 2 Angular JS Angularjs Angularjs 1 anonymous users accessing lists and libraries App Permissions for SharePoint 2013 membership unique email TreeView Control Attendees in SharePoint Auto refresh list using Content Editor WebPart in SharePoint 2013. Auto Refresh SharePoint list using JavaScript Block and unblock of attachment types in SharePoint Blogger C# Callouts in SharePoint 2013 Cascading Dropdown list in SharePoint change onenote to another location. change SuiteBarLeft in SharePoint 2013 check if userid exists in database c# click node text to expand/collapse in Treeview client object model Close webpart CQWP crate chart using BI site in PPS Create a modern team site collection in SharePoint online Create BI chart in PPS SharePoint 2013 create filter in dashboard designer. create kpi's in dashboard designer create kpi's in SharePoint 2013 dashboard designer Create List Create List In SharePoint Create List using Power Shell Script Create Lookup Field in List using Power Shell Script Create lookup field in List create SharePoint List custom view. create SharePoint List views in List Schema create site collection in site collection in SharePoint using powershell created Date Time calculated field in SharePoint Cross site Collection in SharePoint 2013 Crud Operation in Using Stored Procedure Custom MasterPage Approval in SharePoint custom view for survey list Customly add SharePoint List view in Page. delete items in sharepoint using powershell Difference between Angular 1.x & Angular 2 difference between Office 365 and Windows Azure difference between Windows Azure and Office 365 in sharepoint? DifferenceBetween discussion board Display Data in Grid View display radio buttons and choice fields horizontally in SharePoint 2013 Document library DotNet Drag and drop documents in document library in SharePoint dynamically populating values from one list to another list using jquery in sharepoint edit and delete buttons in datagridview Edit Links email notification using Nintex enable anonymous access in SharePoint 2013 enable app catalog sharepoint online site collection powershell Enable appcatalog site collection level using PowerShell based on Input file Enable versions for list and library except the hidden lists using PowerShell Script Error occurred in deployment step 'Recycle IIS Application Pool': Cannot resolve model for the project package Errors&Solutions Export document library in sharepoint using powershell Export particular Group in Term Store Management in SharePoint 2013 Export to Excel first release Flow Flow features free disk space on servers using powershell Friendly URLs and Managed Navigation in SharePoint 2013 get a list of site collection with template in web application using PowerShell Script in SharePoint Get attachments in SharePoint custom list using c# get current list item id sharepoint programmatically Get current url using jquery Get data from SharePoint list using Rest api & Angular JS Get Random Get Random SharePoint items using PowerShell Get Random values from SharePoint list using PowerShell Get url of the last value using jquery Get-SPOSite : The managed path sites/yoursitename is not a managed path in this tenant. Getting Email From User Hide “Edit Links” in left navigation SharePoint 2013 hide button in sharepoint based on permissions Hide column in SharePoint List view hide fields using client side object model Hide list in Quick Launch in SharePoint using PowerShell How to add Custom Tiles to SharePoint site Page. How to add extension files in Search Navigation in SharePoint 2013 How to Add Multiple users Using SharePoint People Picker How to add SharePoint list view in Page using C# How to Approve MasterPage using PowerShell in SharePoint How to bind Multiple users Using SharePoint People Picker how to change indicators on kpi performance how to check if an email address already exists in the database in how to configure workflow manager platform for SharePoint 2013 how to create calculated value using powershell how to create certificate in SharePoint How to create flow. how to create gantt chart webpart in sharepoint how to create KPI indicators in Dashboard designer How to create moden communication site in SharePoint online How to create Multi selected filter in Dashboard How to create nintex workflow in sharepoint how to create rdlc reports in How to Display Data Grid View in How to enable anonymous access in SharePoint How to find data in datagridview in c# How to get image names from the folder using C# how to get particular list content type id in SharePoint 2013 How to get QueryString value in SharePoint WebPart Programatically how to get the current item id for newly created item using REST API and JQuery how to hide list in sharepoint how to know who created list in sharepoint How to make a Site Collection Read-Only in SharePoint 2010 How to overlay Office 365 shared calendar on SharePoint Site how to pass jquery value to textbox control How to pass pagename as a browser's title bar in the page how to remove unused Application Pool in SharePoint how to remove zone using powershell script How to send mail to particular group of people using PowerShell how to update modified by and created by using powershell how to uplaod RAR files in blogger import csv data into sharepoint import data using powershell Import group to term store management using SharePoint 2013. InfoPath InfoPath Cascading Dropdown list Insert update delete in datagridview in C# winforms Integration from SharePoint to k2. K2 Smart Forms for SharePoint JavaScript Injection jquery K2 blackpearl K2 Designer K2 Designer Workflow. K2 smartform cascading dropdown list k2 Workflow K2 workflow to send a mail with PDF left navigation Local Term Set in managed meta data Managed meta data navigation in SharePoint 2013 Managed metadata service in SharePoint 2013. Managed Navigation in SharePoint 2013. Managed Promoted Sites. meta data navigation Microsoft Flow New Features New-SPConfigurationDatabase The user does not exist or is not unique NintexWorkFlow Office 365 OneNote overwrite existing document in sharepoint using javascript PDF Converter PDF Method in K2 Performance Point Service in SharePoint 2013 PerformancePoint Services Configurtion PerformancePoint Services Configurtion for SharePoint 2013 PerformancePoint Services in SharePoint Server 2013 Popularity trends in SharePoint 2013 Pages populate dropdown list dynamicallyusing jquery Power Shell Power shell script to get SharePoint site size. powershell read xml PowerShell Script PowerShell script to get list of users from SharePoint groups PowerShell Scripts in SharePoint 2013 Powershell to set the masterpage in SharePoint Promoted Links Promoted Sites psconfig.exe quick launch Rdlc reports Readonly Column in SharePoint Editview Realtime DotNet Interview Questions Recent Dotnet interview questions Recent SharePoint interview questions recover deleted OneNote page. OneNote content is missing Regional Settings in SharePoint 2013 Replace New Item text in SharePoint Rest API Schedule PowerShell Script Search in SharePoint 2013 Search navigation in SharePoint 2013 Secure store service SecureStore Services SecureStore Services configuration for SharePoint 2013 self-signed certificate on IIS Server Send email to members of SharePoint Group using PowerShell sharepint2010 sharepoin2010 SharePoint 2013 SharePoint 2010 SharePoint 2013 SharePoint 2013 Dashboard Designer SharePoint 2013 features SharePoint 2013 Interview Questions SharePoint 2013. SharePoint 2013.disable views from user to create SharePoint 2013.Power shell SharePoint 2013.SharePoint 2010 SharePoint 2016 SharePoint Administration SharePoint Alerts and Reminders SharePoint App Configuration SharePoint Apps SharePoint Bulk upload SharePoint Calculated field SharePoint Calendar View sharepoint interview questions SharePoint online training SharePoint Onprem vs Online SharePoint RealTime Online Training SharePoint2010 SharePoint2013 SharePoint2016 SharePointInterview SharePointOnline SharePointOnline;Restore deleted site;SharePoint 2013 show data in datagridview in C# Simple Insert update Delete Retrieve Clear in Site Collection Operations in SharePoint 2013 Site Collection Read-Only in SharePoint 2013 site contents Sorting & Filtering SPSite Site Collection Operation parameters in SharePoint 2013 Step by step to create rdlc report in .Net Store names in text files in C# Sub site Subsite Term store management. The server was unable to save the form at this time. please try again UI New look update created by using client side object model update field values in SharePoint using powershell update items in SharePoint list using client object model update modified by field using client side object model upload zip files in blog use IsNullOrEmpty in PowerShell VirtoSoftware VirtoSofware vitrosoftware WebParts what is Document Set in SharePoint 2010 What is Filter in SharePoint Dashboard what is Limited-access user permission lock down mode feature What is Modern Team site What is Target Audience in SharePoint Who Created Site Using PowerShell Workflow in SharePoint 2013 Workflow management platform in SharePoint 2013 Workflow manager for SharePoint 2013 XSL-Template.