pnp / pnp-tools Goto Github PK
View Code? Open in Web Editor NEWScripts and tools for Office 365 and SharePoint - More for IT Pro's
License: MIT License
Scripts and tools for Office 365 and SharePoint - More for IT Pro's
License: MIT License
All,
Just a quick note...
In the documentation about using credentials (username/password) in lieu of using a Principal (client/secret), the sample STILL uses the -c and -s parameters:
"sandboxtool -m scanandanalyze -t -u -p
A real life sample:
sandboxtool -m scanandanalyze -t contoso -c [email protected] -s mysecret
"
This WILL generate an error.
ALSO, most people tend to execute the tool using "dot-sourcing" to ensure all the variables (scope) is INCLUDED in the scope of the current PowerShell session, so I'll add "." to the front of the sample command as well, and a fake PowerShell prompt as well...
The CORRECT verbiage & sample should look like this:
"sandboxtool -m scanandanalyze -t -u -p
A real life sample:
PS>.\sandboxtool.exe -m scanandanalyze -t contoso -u [email protected] -p mypassword
"
Cheers - Mark Vogt
I noticed that when the PnP responsive js is loaded to the page, the date picker (e.g. in adding a new item with date field) does not function properly. In Firefox and Chrome it seems to open the calendar div, but only as a white box, in IE and Edge, not even this. The subdivs remain display:none.
Adding the ADMA import attribute flow rule that flows sAMAccountName into AccountName
New issue discovered in this thread:
#9 (comment)
The Install-SharePointSyncConfiguration command modifies the original XML configuration files instead of creating copies. The problem happens when Install-SharePointSyncConfiguration is run again, it looks for specific items which no longer exist because the file was modified.
When viewing an OOTB team site at mobile device width (320px) the page is pushed out to the right, causing it to scroll.
This is caused by the Newsfeed web part having minimum widths of 450px on a number of elements.
All,
I'm using this tool to assist with a client's remediation, but I noted the following...
On all WSPs which possess "empty" assemblies the SandboxTool.exe did the following:
That is, HERE is what the ORIGINAL WSP looks like once you open it up in 7zip:
\CompanyABC.Intranet.Branding Elements\ <== (folder containing other stuff)
CompanyABC.Intranet.Branding.dll <== original "empty" assembly (DLL)
manifest.xml
Here is what's inside the ORIGINAL manifest.xml file:
> <?xml version="1.0" encoding="utf-8"?>
> <Solution etc etc etc>
> ...
> <Assemblies>
> <Assembly Location="IPG.Intranet.Branding.dll" DeploymentTarget="GlobalAssemblyCache" />
> </Assemblies>
> ...
> </Solution>
In the _FIXED version of the WSP , here's what it contains:
\CompanyABC.Intranet.Branding Elements\ <== (folder containing other stuff)
manifest.xml
So the DLL is now DELETED from the WSP, but HERE's what the "_fixed" manifest.xml file looks like:
> <Solution etc etc etc>
> ...
> <Assemblies>
> <Assembly Location="IPG.Intranet.Branding.dll" DeploymentTarget="GlobalAssemblyCache" />
> </Assemblies>
> ...
> </Solution>
Note the reference to the DLL was NOT REMOVED from the manifest.xml file !!!
DISCUSSION:
What is everyone doing?
-Mark
When using the Get-SPOnlineSandboxSolutionList, we are not able to use this script with an Admin account that requires multi-factor authentication. What can be done to enable this functionality?
Apply-SPOProvisioningTemplate : The Provisioning Template URI 01-Responsive.UI.Infrastructure.xml is not valid.
At line:49 char:5
Apply-SPOProvisioningTemplate -Path .\01-Responsive.UI.Infrastructure.xml -H ...
- CategoryInfo : WriteError: (:) [Apply-SPOProvisioningTemplate], ApplicationException
- FullyQualifiedErrorId : EXCEPTION,OfficeDevPnP.PowerShell.Commands.Branding.ApplyProvisioningTemplate
Apply-SPOProvisioningTemplate : The Provisioning Template URI 02-Responsive.UI.Template.xml is not valid.
At line:52 char:5
Apply-SPOProvisioningTemplate -Path .\02-Responsive.UI.Template.xml -Handler ...
- CategoryInfo : WriteError: (:) [Apply-SPOProvisioningTemplate], ApplicationException
- FullyQualifiedErrorId : EXCEPTION,OfficeDevPnP.PowerShell.Commands.Branding.ApplyProvisioningTemplate
Hi please can anyone let me know if this functionality can work with sharepoint foundation? Thanks
On line 54 of Enable-SPResponsiveUI.ps1 - "succeded"
Fix is in progress
I was trying to enable Responsive UI to SharePoint 2013. Below are the steps performed,
Logged into farm 2013 with admin credentials
Downloaded files from this repository, Master on farm, unzipped and placed Pnp-Tools-Master folder in 'E' drive
opened SP 2013 Management Shell, executed below commands
--> cd 'My folder path'
--> .\Enable-SPResponsiveUI.ps1 -TargetSiteUrl 'My Site URL'
Prompts for credentials, after submitting cred's,
'Connecting to target site URL : ....'
'Enabling responsive UI on target site'
At this point it says,
Exception occurred!
Exception Type: System.Management.Automation.CommandNotFoundException
Exception Message: The term 'Enable-SPOResponsiveUI' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
what's the reason for this?
SP 2013 CU - 15.0.4569.1506
Powershell Version - 4.0
PS E:> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
Above are my SP 2013 CU & Powershell versions. Can someone please suggest ?
Running into a couple of issues while attempting to install this solution.
First when trying to run the PS1 file from the downloaded zip it gave me an error message stating ".ps1 is not digitally signed. The script will not execute on the system."
To get around this, I simply copied the content of the ps1 file into a text file and saved that as that as a ps1 file.
This allowed me to enter in the TargetSiteUrl and creds, however it then threw another error below:
"Exception occurred!
Exception Type: System.UriFormatException
Exception Message: Invalid URI: The URI scheme is not valid."
Any ideas as to why these exceptions are occurring?
Also, is the Team Site the only site collection definition this solution will work for?
Hi Guys i have ran the command and it was successful but when i load the page . Its not responsive.
I can see the files in the style library in the root site.
I applied the responsive to a sub-site.
Any ideas and thanks in advance
I've deployed the responsive solution successfully to a blank team site, and the elements reflow nicely when changing the width of my browser. But when viewed on an actual mobile phone, it displays the full page.
I think this is due to the absence of a viewport meta tag in the header, which tells the page to render at the device's width. Something like:
<meta name="viewport" content="width=device-width, initial-scale=1">
This could be injected by the JavaScript.
We were using a server configuration that was based on an older build of the SharePoint Connector. With that original server configuration, when auto-configured using the script, the customer would also need to go into the MIISClient.exe, and re-enter the password for the SPMA.
With the new server configuration, including the SPMA instance based on the SharePoint Connector 4.3.1935.0, no additional manual configuration is needed on the SPMA, when using the script to auto-configure the solution.
$domainPartition = Select-Xml -Xml $admaXml -XPath "//ma-partition-data/partition[name='DC=Litware,DC=com']"
VERBOSE: Contacting AD to get the partition details
VERBOSE: Configuring the Active Directory Connector
VERBOSE: AD Forest: contoso.local
VERBOSE: AD OU: ou=users,dc=contoso,dc=local
VERBOSE: AD Credential: contoso\contosoadmin
VERBOSE: AD Naming Partition: DC=contoso,DC=local
VERBOSE: AD Config Partition: CN=Configuration,DC=contoso,DC=local
The property 'name' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:122 char:5
$domainPartition.Node.name = $DefaultNamingContext.distinguishedN ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'dn' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:123 char:5
$domainPartition.Node.'custom-data'.'adma-partition-data'.dn = $D ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'name' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:124 char:5
$domainPartition.Node.'custom-data'.'adma-partition-data'.name = ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'guid' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:125 char:5
$domainPartition.Node.'custom-data'.'adma-partition-data'.guid = ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'inclusion' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:126 char:5
$domainPartition.Node.filter.containers.inclusions.inclusion = $D ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'exclusion' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:127 char:5
$domainPartition.Node.filter.containers.exclusions.exclusion = $C ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'inclusion' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:128 char:5
$domainPartition.Node.filter.containers.inclusions.inclusion = $O ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'name' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:132 char:5
$configPartition.Node.name = $ConfigurationPartition.distinguishe ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'dn' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:133 char:5
$configPartition.Node.'custom-data'.'adma-partition-data'.dn = $C ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'name' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:134 char:5
$configPartition.Node.'custom-data'.'adma-partition-data'.name = ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'guid' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:135 char:5
$configPartition.Node.'custom-data'.'adma-partition-data'.guid = ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The property 'inclusion' cannot be found on this object. Verify that the property exists and can be set.
At F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\SharePointSync.psm1:136 char:5
$configPartition.Node.filter.containers.inclusions.inclusion = "C ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERBOSE: Importing the Synchronization Service configuration
VERBOSE: Path: F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync
VERBOSE: Performing the operation "The MIIS Agents and Metaverse Schema will be replaced with the sever import files in F:\SP20
16\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync." on target "MIIS Service".
VERBOSE: Metaverse schema updated.
VERBOSE: Metaverse schema updated.
VERBOSE: Management Agent Created: F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\MA-ADMA.XML.
VERBOSE: Management Agent Created: F:\SP2016\PnP-Tools-master\PnP-Tools-master\Solutions\UserProfile.MIMSync\MA-SPMA.XML.
VERBOSE: Metaverse Schema Updated With IAF and Metaverse Deletion Rules.
WARNING: =======================================================================================
WARNING: IMPORTANT: the Password must be set on the AD Connector before sychronization will work
WARNING: =======================================================================================
VERBOSE: Configuring the SharePoint Connector
VERBOSE: SharePoint URL: http://sps-app-0:2016/
VERBOSE: SharePoint Host: sps-app-0
This must be fantastic but I tried downloading it from here and then installing it
But I get errors :
Microsoft.SharePoint.Client.IdcrlException
and
The user ID is not formatted correctly to correspond to a Microsoft account.
Its seems its trying to login to a SharePoint Online?
Is there a different download for SharePont On premise?
Can anyone help?
Could you please help me resolve the below issue. I am running the script in SharePoint 2013 On -premises.
Exception occurred!
Exception Type: System.Management.Automation.CommandNotFoundException
Exception Message: The term 'Connect-SPOnline' is not recognized as the name of
a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
Exception occurred!
Exception Type: System.Management.Automation.CommandNotFoundException
Exception Message: The term 'Connect-SPOnline' is not recognized as the name of a cmdlet, function, script file, or oper
able program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Kindly advise.
Hello,
it is possible to use the Responsive UI for a publishing site?
Thanks in advance
o This fixes several build and file signing issues that were discovered recently
o Enables multiple partitions to be specified in the Set-MIISADMAConfiguration, allowing us to greatly simplify the Install-SharePointSyncConfiguration script from the SharePointSync.psm1 module
o Enables better functionality with the Add-MIISADMARunProfileStep PowerShell cmdlet to better create and update run profiles with multiple partitions
o Includes the code to skip specified management agent definitions in the Import-MIISServerConfig PowerShell cmdlet
o http://support.microsoft.com/KB/3134725
Most administrators are quite busy, and would prefer a push notification that secrets/certs are expiring. I will extend the sample to include an Azure WebJob to email expiration notices using the Graph.
Hi, I'm trying to run the Install-SharepointSyncConfiguration and I keep getting an error "unable to locate the MA : SPMA...".
I'm not overly familiar with the operation of Sharepoint or MIM........but I'm guessing this may indicate that some previous steps may have been missed out?
I have an on premise SharePoint 2013 web application that leverages a trusted identity provider (in this case ADFS). I have also deployed a custom claims provider in line with MSDN documentation to resolve users. I was trying to deploy the responsive UI pack to the root site collection of this web application. I don't have an in-depth understanding of how the PnP Powershell Cmdlets work for authentication (based on instructions I did install v15 and ran latest updates against SharePoint 2013). Is the Enable/Disable-SPResponsiveUI expected to fail in these scenarios? Based on my tests I'm getting the following error:
Exception occurred!
Exception Type: System.Net.WebException
Exception Message: The remote server returned an error: (403) Forbidden.
I am noticing on OSX devices after implementing this that the upload button is non-responsive.
Ran the import script which completed without any error.
Start-SharePointSync -Verbose but no profiles showed up in SharePoint.
Check Director Partitions --> Container for DC=contoso, DC=local and no container were selected.
Select the correct container and all profiles showed up in SharePoint.
The setup document must have a pointer to review and select the correct container
Thanks,
Jerry
I'm trying to get this working on the 2016 test environment (before going into Prod)
Downloaded and installed the SharePointPnPPowerShell2016.msi ... running the Powershell with
.\Enable-SPResponsiveUI.ps1 -TargetSiteUrl "http://portal/" -InfrastructureSiteUrl "http://portal"
Results is this:
"Connecting to target site URL: http://portal
Exception occurred!
Exception Type: System.Management.Automation.CommandNotFoundException
Exception Message: The term 'Connect-SPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again."
What am I doing wrong?
This functionality is present in Hotfix http://support.microsoft.com/KB/3134725 thus the script no longer needs it.
If there is a table in the content, this will prevent the responsive UI from auto-adjusting. Is it possible to include class for making a table "responsive" as well?
SharePointSync.psm1 requires at least version 4.3.2064 of MIM Sync because it includes fixes to the MIM PowerShell module. If that version of MIM Sync is not installed then the Install-SharePointSync function would fail with this error:
Set-MIISECMA2Configuration : A parameter cannot be found that matches parameter name 'ParameterUse'.
At C:\temp\SharePointSync\SharePointSync.psm1:147 char:45
The latest version of SharePointSync.psm1 will detect this an fail early.
To get 4.3.2064, go here:
https://support.microsoft.com/en-us/kb/3092179
I noticed that in the javascript it has the following:
PnPResponsiveApp.setUpToggling = function () {
// if it is already responsivized, return
if ($("#navbar-toggle").length)
return;
// Set up sidenav toggling
var topNav = $('#DeltaTopNavigation');
var topNavClone = topNav.clone()
topNavClone.addClass('mobile-only');
topNavClone.attr('id', topNavClone.attr('id') + "_mobileClone");
topNav.addClass('no-mobile');
$('#sideNavBox').append(topNavClone);
var sideNavToggle = $('<button>');
sideNavToggle.attr('id', 'navbar-toggle')
sideNavToggle.addClass('mobile-only');
sideNavToggle.addClass('burger');
sideNavToggle.attr('type', 'button');
sideNavToggle.html("<span></span>");
sideNavToggle.click(function() {
$("body").toggleClass('shownav');
sideNavToggle.toggleClass('selected');
});
$("#pageTitle").before(sideNavToggle);
}
Which works, but only halfway. The standard sidenav can be edited just fine on mobile, but when you try to edit the topnav links that are appended from the JS above, you click the "Edit Links" button, but nothing happens. Click it twice, and it just disappears.
I tested this on a desktop as well by shrinking the window to mobile, and then trying to edit links. Same result, however, when you expand the window to full screen on desktop, the topnav goes back to the top, and you'll see it is in edit mode.
Please come up with a solution for this.
Hi,
I enabled the package at the site collection level but it appears to only apply to the root site and not the sub-sites by default. Is it supposed to do so?
It used to apply for all sub-sites with previous versions I think. Is it changed now?
Thanks for your help.
Site navigator makes page wider in mobile like the newsfeed issue on SP 2013 on prem.
I applied the responsive files with the script and everything is working just fine but when I access my sharepoint site from a iPhone or a Samsung device I don't get the responsive theme. Any ideas?
How feasible/practical would it be to consider adapting JavaScript for this solution to avoid the dependency on JQuery ?
There is certainly a case for this solution to be more atomic against dependant frameworks and avoid conflicts with JQuery versions used by apps/webparts/pages in an implemented (or current) Portal
Update to the SharePoint Connector build 4.3.2201.0 - A new connector build will be released on the download center - adjust documentation to reflect this build. Add check to SPMA connector assembly to ensure minimum version in place.
Hi All,
When I run the enable-spresponsiveui poweshell script I receive the following error:
Apply-SPOProvisioningTemplate : Could not load type 'Microsoft.SharePoint.Client.AuditMaskType' from assembly 'Microsoft.SharePoint.Client,
Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
Can anybody help?
Many Thanks
Nick
Hello,
Where can I get the "SharePointSynchronization.dll" which is referenced in "MA-ADMA.XML" and "MA-SPMA.XML" from the "UserProfile.MIMSync"?
In the folder C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Extensions\ are only these files:
Exch2007Extension.dll
Exch2010Extension.dll
FunctionLibrary.dll
GALSync.dll
Logging.dll
Logging.xml
Microsoft.IdentityManagement.Connector.Sharepoint.dll
Microsoft.IdentityManagement.ManagedLogger.dll
Thank you.
Best regards,
Lucian
Hi
I try to run Enable-SPResponsiveUI.ps1 on my Sharepoint 2013 SP1 environment (with an admin account) and I always receive :
Exception occurred!
Exception Type: System Exception!
Exception Message : Error Establishing a connection
Howver my site is up and running.
What can be the cause ?
Thanks for your help.
Cheers
Christophe
On ln 94 in SP-Responsive-UI.css:
img {max-width: 100%;}
This breaks all of the image sprites used for the search, ribbon, "get started" tiles, etc.
In order to have the equivilience of the UPSS in MIM, we need to have an ADMA Export Run Profile. I've updated the SharePointSync.psm1 and the MA-ADMA.xml to include the run profile. If we could get this into the original package, that would be great.
If we view the site with "Focus on Content" button clicked, there will be issue when viewing the site with tablet. Some content on the left hand side is not viewable.
This is not working Good app/browser for iPad.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.