Friday, January 27, 2017

Office Web Apps 2013 -2016 Server Install and Configuration

Office Web App

Sharepoint side :

get-SPWOPIBinding - show ofiice web app configuration

Remove-SPWOPIBinding -All:$true -remove office web app from sharepoint

New-SPWOPIBinding -ServerName "OfficewebAppServer FQDN"-AllowHtp- connect sharepoint to owa server

Set-SPWOPIZone -zone "external-https" - use if  users  have external and internal connection

Set-SPWOPIZone -zone "internal-http" - use if  you  have only internal connection

An update conflict has occurred, and you must re-try this action. The object SearchServiceApplication Name={FAST SSA} was updated by {account}, in OWSTIMER (5836) process, on machine {server name}.

An update conflict has occurred, and you must re-try this action. The object SearchServiceApplication Name={FAST SSA} was updated by {account}, in OWSTIMER (5836) process, on machine {server name}.


1. Stop the SharePoint timer service. My  preference is command prompting this: net stop sptimerv4
2. Locate the SharePoint cache folder: \ProgramData\Microsoft\SharePoint\Config\{Guids Folders} . Locate the Guid folder that contains a file called cache.ini. We won’t delete this file. We will delete all files in the folder (but the cache.ini). Recycle bin them if you’re feeling better. Edit the cache.ini file and replace the number in it with something else.
3. Restart the SharePoint timer service, net start sptimerv4
4. Watch the cache (Guid folder) cleaned in step 2 being repopulated with files. Check the cache.ini file’s content, your temporary value will be gone.

An update conflict has occurred, and you must re-try this action

Cannon Add Web application.

An update conflict has occurred, and you must re-try this action

An update conflict has occurred, and you must re-try this action. The object SPAlternateUrlCollection Name=WEBAPPLICATION Parent=SPFarm Name=SharePoint_Config is being updated by DomainName\UserName1, in the w3wp process, on machine ServerName. View the tracing log for more information about the conflict.


  1. Stop the Timer service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click Windows SharePoint Services Timer, and then click Stop.
    3. Close the Services console.
  2. On the computer that is running Microsoft Office SharePoint Server 2007 and on which the Central Administration site is hosted, click Start, click Run, type explorer, and then press ENTER.
  3. In Windows Explorer, locate and then double-click the following folder:
    Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID
    Notes
    • The Drive placeholder specifies the letter of the drive on which Windows is installed. By default, Windows is installed on drive C.
    • The GUID placeholder specifies the GUID folder.
    • The Application Data folder may be hidden. To view the hidden folder, follow these steps:
      1. On the Tools menu, click Folder Options.
      2. Click the View tab.
      3. In the Advanced settings list, click Show hidden files and folders under Hidden files and folders, and then click OK.
    • In Windows Server 2008, the configuration cache is in the following location:
      Drive:\ProgramData\Microsoft\SharePoint\Config\GUID
  4. Back up the Cache.ini file.
  5. Delete all the XML configuration files in the GUID folder. Do this so that you can verify that the GUID folder is replaced by new XML configuration files when the cache is rebuilt. 

    Note When you empty the configuration cache in the GUID folder, make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
  6. Double-click the Cache.ini file.
  7. On the Edit menu, click Select All.
  8. On the Edit menu, click Delete.
  9. Type 1, and then click Save on the File menu.
  10. On the File menu, click Exit.
  11. Start the Timer service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click Windows SharePoint Services Timer, and then click Start.
    3. Close the Services console.
    Note The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.
  12.  Make sure that the Cache.ini file has been updated. For example it should no longer be 1 if the cache has been updated.
  13. Click Start, point to Programs, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.
  14. Click the Operations tab, and then click Timer job status under Global Configuration.
  15. In the list of timer jobs, verify that the status of the Config Refresh entry is Succeeded.
  16. On the File menu, click Close.


View IIS Errors


Open Web.config file on the IIS  site -> There you need to search for CallStack and change CallStack = “true” 
Similarly search for CustomError and change CustomError =”Off” 

That’s it you can now browse the page where you are facing the issue and then you will be able to know the root cause of the error and then accordingly handle it.

Tuesday, January 24, 2017

Send Mail from CMD

telnet localhost smtp
HELO yahoo.com
mail from: sender@test.com
250 2.1.0 sender@tecadmin.net... Sender ok
rcpt to: myemail@mail.com
250 2.1.5 myemail@mail.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Hey
This is test email only

Thanks
.
250 2.0.0 r9M95xgc014513 Message accepted for delivery
quit
221 2.0.0 fbreveal.com closing connection
Connection closed by foreign host.

Monday, January 23, 2017

Powershell script to get users logged in in last 30 days

Powershell script to get users logged in in last X days

get-aduser -filter {lastlogondate -gt "8/1/2013"} -Properties lastlogondate | select Name,LastLogonDate | sort name


(get-aduser  -server contoso.com -filter {lastlogondate -gt "8/1/2013"} -Properties lastlogondate).count