Friday 10 February 2023

Rescan Disk Option Greyed Out | New Disks Not visible on Disk management | Update-HostStorageCache

 Recently I have added several LUN from NetApp Storage to Hyper-V servers.

But in the disk management I couldn't see those new LUN.
Existing LUN from same SAN is working, So no connections issues between Hyper-V, SAN Switch and SAN.

Rescan, Refresh options are Greyed Out in Disk management.




Generally will do reboot if it is VM, But Hyper-V during business hours may cause issues.
So go to PowerShell and execute the command (applicable to all Windows OS Hyper-V and VM) hereafter I won't reboot.



All my new LUN's are now visible, without an reboot :-) ;)



Share the learning, Keep it for future reference and Grow together.

Best Wishes.

Monday 3 April 2017

Cannot Complete This Action in SharePoint.

Cannot Complete This Action 


The above message was appeared when I selected "Manage Permission" for a Folder or File in a Library which has Unique permission.

Received Access Denied System account error for System Account. It had correlation ID and yes it is On-Prem environment.

Immediately stepped into analysis part of the Correlation ID and got the below message in ULS.

(ULS Message ->System.Runtime.InteropServices.COMException: Cannot complete this action.  Please try again.    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl)     at Microsoft.SharePoint.Library.SPRequest.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl)

Didn't find any useful message in MS Forum as well. ACL becomes blank and found some multiple useful links and finally made my solution for the issue.

I want to generate GID for the folder and the files located inside the folder. We can easily generate the GID for content database but how for Document and Files.

Need the below value and have to execute some scripts in SharePoint PS and MSSQL as well.

1. Document ID (the document where are you getting cannot complete action error message).
2. Site collection ID.
3. Site ID
4. Old Scope ID.

We can execute the below command in SharePoint PS for getting Site Collection ID and Site ID. In My scenario root site in sitecollection so the sitecollection and site url is remain same but GID is different.

The highlights value need to be changed as per your scenario. I got the 29 item id from the URL which display cannot complete this action error message.

My URL looks like http://SCS-workspace.com/WCMP/Project_Problem/_layouts/User.aspx?obj={7E86BE22-6841-46A2-9CA0-F82B9C75B73D},29,LISTITEM&List={7E86BE22-6841-46A2-9CA0-F82B9C75B73D}
--------------------------------------------------------------------------------------------------------------------------
Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite http://webapplication_address/wildcardmanagedpath/sitecollectionname
$site.ID
$web = Get-SPWeb http://webapplication_address/wildcardmanagedpath/sitecollectionname
#if you have issue in subsite then you need to add the subsite url in the $Web command
$web.ID

$list = $web.Lists[“Your List or Lib Name”]
$item = $list.GetItemById(29)

$item.Url 
#The above command will provide you the URL of Item ID 29 copy that and past it in the next SQL Query.


$item.UniqueId
------------------------------------------------------------------------------------------------------------------------

The above PS cmdlets will provide three information to us

1. Site Collection ID
2. Site ID
3. Document ID

For the remaining one information Old Scope ID required for us to resolve the issue.

To find the Old Scope ID, we have execute the below command on the MSSQL DB Server.

To get the content database name for the site collection Go to Central Administration -> View all site collection option.
---------------------------------------------------------------------------------------------------------------------
USE [ Content Database Name]
GO

SELECT TOP 1 [ScopeId]
FROM [ Content Database Name].[dbo].[Perms]
WHERE ScopeUrl = ‘webapplication_address/wildcardmanagedpath/sitecollectionname/listname/foldername

GO
---------------------------------------------------------------------------------------------------------------------

Now we have all the information which stated above in the post. Almost we are in climax to resolve the issue. We are going to execute proc_SecResetItemPerm stored procedure.

---------------------------------------------------------------------------------------------------------------------

USE [ Content Database Name]
GO

DECLARE @return_value int,
@NewScopeId uniqueidentifier,
@RequestGuid uniqueidentifier

EXEC @return_value = [dbo].[proc_SecResetItemPerm]
@SiteId = ‘857f33d1-4618-4e41-82be-0d6f0c909054’,
@WebId = ‘ff426804-ea67-4ca6-8d17-ba8682a8dcc9’,
@OldScopeId = ‘64CF7957-E364-4649-9DFD-213F9C78D031’,
@Url = N’WCMP/Project_Problem/Blank Forms/Line 1/Archive for Trim and problem Checklist′,
@DocId = ‘9df7e23c-4809-40b7-8a9c-40ec3867eea6′,
@NewScopeId = @NewScopeId OUTPUT,
@RequestGuid = @RequestGuid OUTPUT

SELECT @NewScopeId as N’@NewScopeId’,
@RequestGuid as N’@RequestGuid’

SELECT ‘Return Value’ = @return_value

GO

---------------------------------------------------------------------------------------------------------------------

That's it, Issue resolved now the folder or file started inheriting the permissions from its parent and you won't receive cannot complete this action error message for the folder.

Thanks for reading the Post.

மிக்க நன்றி 
---------------------------------------------------------------------------------------------------------------------

வீழ்வது நாமாக இருப்பினும்!!!
வாழ்வது தமிழாக இருக்கட்டும் !!! 

Wednesday 22 March 2017

SP 2016 Config Wizard failed regarding Feature ---> The 'ListInternal' attribute is not allowed.

I had setup several SP 2016 server in my environment. Recenlty I am getting failed message while running SharePoint Configuration wizard with the below error.

Feature definition with Id ca7bd552-10b1-4563-85b9-5ed1d39c962a failed validation, file 'fieldswss4.xml', line 68, character 9: The 'ListInternal' attribute is not allowed. ---> System.Xml.Schema.XmlSchemaValidationException: The 'ListInternal' attribute is not allowed.


To resolve this we have to add a line in wss.xsd file in Hive\template\XML.

Below Line needs to be added at 578 in XML file next to List attribute.

Search the following bold content in XML file name="List" type="xs:string" 

And then include the below line next to the List Attribute

<xs:attribute name="ListInternal" type="xs:string" />

Save the file and re-run the config wizard that's it. Cool.

Wednesday 9 November 2016

Distributed Cache on Error Starting in one of the SharePoint 2013 server in a Farm.



Recently I want to setup a Medium SharePoint Server farm with 2+2 concept. 2 SharePoint web Front end Servers and 2 SharePoint Application Servers.

The second app server was included to the SharePoint farm after a month. During the time as per the requirement we stopped the Distributed cache on WFE's and started the same in APP#01.

When tried to starting the distributed cache on APP#02 it shows error starting.

Then did lot of option from Google Suggestion but no luck, so thought back my IIS admin role and copied "DistributedCacheService.exe.config" from working server (APP#01).

The config file will be available on "C:\Program Files\AppFabric 1.1 for Windows Server".

After copied I tried to start the service using powershell with the cmdlet of Start-SPServiceInstance.

Again it failed after a day but with below error.


Error executing service instance (un)provisioning job.  Service instance: "Distributed Cache" (id "b6c10332-478a-483a-9b1a-a949040de1d9) "cacheHostInfo is null""

with the error message of CacheHostInfo is null and decided to fix the Cluster Configuration of Distributed cache and got a ps script


Solution:


  • Copy the below and Save it with .ps1 extenstion.
$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}

if([System.String]::IsNullOrEmpty($cacheClusterInfo.CacheHostsInfoCollection))
{
    #here's the key. we can't provision, unprovision, start, or stop a Cache Service because we still have a Cache Service that have no server attached
    $serviceInstance.Delete()
    Add-SPDistributedCacheServiceInstance
    $cacheClusterInfo.CacheHostsInfoCollection
--------------------------------------------------------------------------------------------------------------------------

  • Execute the .ps1 from the server where the Distributed Cache is working fine.
  • Login to the server where distributed cache is having a problem to start
  • Find and get the service Instance ID of distributed cache which has problem.
  • To find the below command will help you to take it
Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status


  • Copy the service instance ID which has problem and past it in the below command. which will delete the service instance. 

$service = get-spserviceinstance b6c10332-478a-483a-9b1a-a949040de1d9 
$service.Delete() 

  • If you execute the below command it will display remaining server except the one which has the problem.
Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status

  • Now execute the  Add-SPDistributedCacheServiceInstance cmdlet in ps window.
If you are having a luck and completing the task without any escalation the above command will be the solution for the issue and refer the central admin. Distributed cache is started on the APP#02.

You can leave reading the post from here and have a JIGARTHANDA (A desert of Madurai, TN, INDIA).

Now if you are reading here then you are like me, being an active person, hard worker and still not getting the place what you want or expecting ;-)

You might again getting the cacheHostInfo is null error in event viewer. So simple Go to services.msc and start Remote Registry services.

Now again execute the script and login back to the App#02 server which has problem.

Execute the cmdlet for deleting the instance and run the  Add-SPDistributedCacheServiceInstance.

Issues is  resolved for me. As usual I learnt new thing and created a post here.

Your suggestions are welcome.



Wednesday 10 September 2014

SharePoint 2013: Reduce AppFabric Calls to Active Directory

AppFabric is a key part of any SharePoint 2013 as we all know by now. It’s used for many things indeed all over the product and AppFabric in turn uses Active Directory to make sure only authorised processes get access to the cache data.

Thus when SharePoint uses AppFabric, it opens a new TCP connection to it and AppFabric has to authenticate that connection with Active Directory; the same as when a user/browser connects to a Windows authentication protected website. Just as with the browser/IIS connection, there’s two ways of authenticating to AppFabric – NTLM or Kerberos, with NTLM being picked if Kerberos isn’t setup. Given Kerberos is a more efficient protocol at caching authorisation we want to use that over NTLM to reduce traffic to AD as it’s just better designed in that respect.

If you have Kerberos logging enabled on a web-front-end for example, something you’ll notice is these SPNs being requested and not being found:

 
 
Notice anything about the SPN? Yep, it’s the AppFabric server we’re trying to use – the client (SharePoint) is trying to connect via Kerberos and it’s not working so we have to fail-back silently to NTLM. That works of course as far as SharePoint’s concerned but we have generated more traffic than we wanted due to this security protocol fall-back.
 

Add AppFabric SPNs to Reduce Calls to Active Directory

As with HTTP, we want to use Kerberos for AppFabric authentication to reduce the extra logins to Active Directory. This is just done by adding the right SPNs to the app-fabric account in the form of:
  • AppFabricCachingService/server:22233
  • AppFabricCachingService/server.domain.fqdn:22233
This you do with either ADSI Edit or setspn; in my example:
  • setspn -U -S AppFabricCachingService/sharepointserver01:22233@scshiva.LOCAL scshiva\svc_cache
That should take care of both SPNs but you might want to try adding the NetBIOS one too manually – Win2012 will duplicate-check the SPN first anyway so there’s no risk. Check the security log again after the change with Kerberos logging enabled to double-check it’s worked if you’re unsure. First though, restart AppFabric (and if I remember right IIS might be necessary too) and you should be good to go – AppFabric will make significantly less calls to Active Directory as it’ll use a Kerberos token instead.
If this is of particular interest I can probably expand on this subject, but that’s it for now.
 
With Regards,
சிவசங்கரன் (Shivashankaran)



Friday 5 September 2014

Configuring a SharePoint farm in single server without domain controller.

Recently I had a requirement of configuring 25 SharePoint development servers.

The beauty of the requirement is "The servers are not joined with Domain".

As usual, I installed the SQL Server 2012 Standard edition.

When installing the prerequisites of SharePoint, The IIS throws the configuration error, had more than 2 cup of coffee, then only released I am having SharePoint 2013 RTM version and trying to install it in Windows server 2012 R2. This is not possible.

Then downloaded the SharePoint 2013 with SP1 and installed the prerequisites and SharePoint too with complete option.

Didn't expect, that I will going to be in office for another 2 hours for configuring the SharePoint. Got the below error and absolutely yes got the help from Mr.Google.


 
 
SharePoint PowerShell is really powerful tool, because it have some backend gate to configure the SharePoint illegally or they missed to check the condition from configuring from PowerShell.
 
Open the SharePoint management Shell with Elevated permission(Run As administrator).
 
Execute the command called New-SPConfigurationDatabase.
 
It will shoot out some question to you like Config Database Name, Database Server Name, Credentials (Enter the local account like below) and provide the passphrase.
 
 
Go and take some sambar vadai(south indian dish), with coffee or some other and open the system the above mentioned command executed successfully. Go to ssms and check the database server you can see SharePoint Config database and admin content database.
 
Now run the SharePoint configuration wizard and choose DO NOT DISCONNECT THE SERVER FROM FARM.


 
Catch you later on next post. Post your queries if you have anything.
 

Wednesday 21 May 2014

Desinging the Search Topology in SharePoint 2013.

Earlier in SP2010 we had an option of amending the search topology in the central Administration itself. But in SP2013 you need to amend the topology through SharePoint PowerShell alone.


In My Scenario I have 2 WFE, 1 APP, 1 for Crawl and 1 for Index.

First of all we need to start the Search Service in the necessary server. So I need to start the service in the APP1, Crawl and Index server.

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "App1"
$hostB = Get-SPEnterpriseSearchServiceInstance -Identity "Crawl"
$hostC = Get-SPEnterpriseSearchServiceInstance -Identity "Index"
Start-SPEnterpriseSearchServiceInstance -Identity $hostA
Start-SPEnterpriseSearchServiceInstance -Identity $hostB
Start-SPEnterpriseSearchServiceInstance -Identity $hostC


Check the status of SSA after started

Get-SPEnterpriseSearchServiceInstance -Identity $hostA
Get-SPEnterpriseSearchServiceInstance -Identity $hostB
Get-SPEnterpriseSearchServiceInstance -Identity $hostC




Creating new topology in the existing service application which we have in the farm


$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa


Creating the necessary components in the new topology. Here I am creating the Admin Component, Analytic Component will be in APP Server

Crawl and Content Processing will be in Crawl Server.


Query processing and Index component will be in Index server. 
 
New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostC
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostC -IndexPartition 0


Activating the topology which we created.


Set-SPEnterpriseSearchTopology -Identity $newTopology

Get the list of topologies which are available in the search serviceapplication. In my scenario the existing one will be available and that will be deactivate after executing the above mentioned Set-SpEnterpriseSearchTopology.


Get-SPEnterpriseSearchTopology -SearchApplication $ssa

In the output of above command just make a note of inactive topology id.

Remove-SPEnterpriseSearchTopoly -Identity "InactiveToplogy ID" -SearchServiceApplication $ssa



That's it now you can check the component status in the central adminstration -> Manager Service Application -> Search Service Application.


Thanks.

சிவசங்கரன் (Shivashankaran)

Rescan Disk Option Greyed Out | New Disks Not visible on Disk management | Update-HostStorageCache

  Recently I have added several LUN from NetApp Storage to Hyper-V servers. But in the disk management I couldn't see those new LUN. Exi...