A few days ago, Microsoft announced a new feature for OneDrive for Business and SharePoint Online. The user may now sync data with “#” and “%” in the files- or folder name. Perfect for the users, but wait: The admin has to switch this feature on, and there is no switch in the admin console.
I have had about 120.000 files synced to the cloud into different Office 365 areas: SharePoint Team sites, Groups and OneDrive for Business. And there were some documents, where the Next Generation Sync Client gives out an error message and I have to change that manually (There were old documents about the language C # in the filename…)
Many user do not understand this. Yes, we know from past: here were many characters, that may not used in file and folder names. And Microsoft has promised, that the last 2 characters will be removed in the first quarter of 2017. And now it’s ready.
All things, that followed, has nothing to do with all OnPremise versions of SharePoint and the old Groove client respectively. If you are a frequent reader of my blog posts, you know, that the Next Generation Sync Client (NGSC) will work only with Office 365 and OneDrive Personal.
|Storage||Omission of “#” und “%”|
|SharePoint Server on Prem||NO|
|OneDrive for Business on Prem||NO|
Libraries in Team Sites und Groups
|OneDrive for Business||YES|
When is this feature available?
No, because there is no switch for the admin; the adminstrator has to deal with PowerShell. For all Office 365 tenants, that will be established after June 2017, this function is set automatically.
So the cmd-lets for Showing / Changing is: Get-SPOTenant / Set-SPOTenant
and the parameter for changing are:
There are three different values:
|Allowed||Allows # and % characters in file and folder names in SharePoint Online and OneDrive for Business document libraries.|
|Disallowed||Disallows the # and % characters in file and folder names in SharePoint Online and OneDrive for Business document libraries.|
|NoPreference||# and % support will be enabled by Microsoft on your Office 365 Tenant when available. NoPreference state is the default state before we enable # and % on behalf of Office 365 Tenants following the schedule mentioned previously. In this state, # and % are turned off and tenant admins can run Set command to switch it to either Allowed or Disallowed. Once it is set by tenant admins, Microsoft will not change the setting when we enable on # and % on behalf of Office 365 Tenants. In addition, this is a read-only state, so it can not be set by running the Set command.|
Before we use PowerShell to connect with SharePoint Online you must ensure, that the SharePoint Online Management Shell is installed. You may download it from this Microsoft site. Even you have it installed, look for the latest version. Start the Powershell online Management Shell, or you use Windows Powershell ISE.
Bevor wir uns per Power Shell mit SharePoint Online ver
Even if you are not use PowerShell each day, I will describe the few steps.
|Login into Office 365 as a SharePoint Administrator or a Global Teanat admionistrator and switch to the SharePoint Admin Center
We need the part with the tenant name from the URL. Here
Now a few lines of PowerShell code:
Connect-SPOService -Url $TenantURL -credential $SharePointAdmin
So the first line shows the assign of SharePoint URL, in the second Line the assignment of your SharePoint Administrator or your Global Tenant administrator. In the third line we use the function Connext-SPOService to connect to the Tenant, a popup window will open and ask for the admin’s credential. The last line we call the function Get_SpoTenant and then we get:
after the first Call you see the value NoPreference for SpecialCharactersStateInFileFolderNames
With Get-SPOTenant you read the data, with Set_SPOTenant you could write or change the data. To Allow # and % as a valid character in a file- or folder name, you have to write:Set-SPOTenant -SpecialCharactersStateInFileFolderNames Allowed
Set-SPOTenant -SpecialCharactersStateInFileFolderNames Disallowed
To Disconnect from you teanant you write Disconnect-SPOService ein.
Important: If you have changed the value, it takes a while, until the changes are affected!
Keep in mind , the changes are for Files /and or folders, not for SharePoint sites (web objects) or Site collections. Developers should also read for API changes
There are only a few lines of code, but then administrators of companies will have less work with their users, because they do not understand, why there is a problem. Unfortunately is code only works in Office 365 and not on Premise
Users with a NAS like Synology will get into trouble, if you switch and have data in OneDrive for Buisness with these characters. The reason is, that they will use the old API
Who knows SaRA?
Microsoft Support and Recovery Assistant for Office 365 with version 16.00.1702.0000 also do not know theses characters, but Microsoft has confirmed me, that this will be changed in the near future.