The cross domain error would be occurred on Silverlight. Because distinct URL has been configured on session central service, session service and run time service.…
One CommentSathiya's Blog Posts
Once we configured the SharePoint outbound mail server then our responsible to test the setup. Here the small powershell snippet will do!
|
1 2 3 4 5 6 7 |
### The script will return True or False $toemail = "sathiya@sathiya.io" $subject = "Test - SharePoint Outbound mail" $body = "This mail for testing purpose...! Please ignore your action!" $site = New-Object Microsoft.SharePoint.SPSite "http://sharepoint/" $web = $site.OpenWeb() [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$toemail,$subject,$body) |
If you…
Leave a CommentIn most of the development environment or staging server will not be monitored by daily. So the database auto growth can occupy countlessly. Here, we…
Leave a CommentCreating claims-based web application is more flexible with SharePoint PowerShell script than CA. Here, the snippet for http and ssl site.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add-PSSnapin Microsoft.SharePoint.Powershell $ap = New-SPAuthenticationProvider New-SPWebApplication -Name <Name> -ApplicationPool <ApplicationPool> -ApplicationPoolAccount <ApplicationPoolAccount> -URL <URL> -Port <Port> -AuthenticationProvider $ap # <Name> is the name of the new web application that uses claims-based authentication. # <ApplicationPool> is the name of the application pool. # <ApplicationPoolAccount> is the user account that this application pool will run as. # <URL> is the public URL for this web application. # <Port> is the port on which the web application will be created in IIS. # For Non-SSL New-SPWebApplication -Name "Web Portal - 80" -ApplicationPool "Web Portal Application Pool - 80" -ApplicationPoolAccount (Get-SPManagedAccount "sathiya\sp_appPool") -URL http://webportal.sathiya.com -Port 80 -HostHeader webportal.sathiya.com -DatabaseName WSS_Content_WebPortal_80 -Path "D:\Web_Portal_80" -AuthenticationProvider $ap # For SSL New-SPWebApplication -Name "Web Portal - 443" -ApplicationPool "Web Portal Application Pool - 443" -ApplicationPoolAccount (Get-SPManagedAccount "sathiya\sp_appPool") -URL https://webportal.sathiya.com -Port 443 -HostHeader webportal.sathiya.com -DatabaseName WSS_Content_WebPortal_443 -Path "D:\Web_Portal_443" -SecureSocketsLayer -AuthenticationProvider $ap |
Cheers…!
Leave a CommentAnother sample Powershell script to exporting “Running” and “Stopped” windows service to excel by using Powershell Array.
|
1 2 3 4 5 6 7 8 9 10 11 12 |
$location = "C:\sathiya.io"; $service = @("Running", "Stopped"); for ($i=0;$i -ne 2;$i++) { $text = $service[$i]; #Exporting the result to the text file # Append - This keyword is to update the file in the loop # Select - To export the field that you want to export Get-Service |?{$_.Status -eq "running"} | Select ServiceName, Status | Out-File $location\text1.txt -Append #Exporting the result to CSV Get-Service |?{$_.Status -eq $text} | Select ServiceName, Status | export-csv $location\file2.csv -Append } |
Cheers!
Leave a CommentAs we are all knows, the SharePoint Powershell can be fast and simple. Here the sample script for creating Managed Metadata Service Application;
|
1 2 3 |
New-SPServiceApplicationPool -Name "Managed Metadata Service App Pool" -Account sathiya\SPAppPool New-SPMetadataServiceApplication -Name "Managed Metadata Service Application" -ApplicationPool "Managed Metadata Service App Pool" -DatabaseName "MMD" New-SPMetadataServiceApplicationProxy -Name "Managed Metadata Service App Pool" -ServiceApplication "Managed Metadata Service Application" |
Cheers!
Leave a CommentSharePoint site with custom host header will prompting the user login screen on local machine but either you can login or view the site from…
Leave a CommentToday, we are going to discuss about importing bulk users in Active Directory using PowerShell. We are all knows that we can do anything in…
Leave a CommentAfter, I installed and configured the workflow for SharePoint 2013 and register to the web application, it was getting an error while starting the workflow…
Leave a Comment