Forum Discussion
null null
Jun 08, 2017Iron Contributor
CSOM PowerShell change title of a list, add ad groups assign permission
Hi, I was trying to put together a powershell script however i ahave couple of queries : how do i change title of a list, add ad groups assign permission to a list. How do i achieve this in...
null null
Jun 12, 2017Iron Contributor
How do i package the script for the pnp cmdlets.
thanks
Jun 12, 2017
Could you explain a bit further please? what do you mean with packaging PowerShell scripts?
- null nullJun 13, 2017Iron Contributor
If i forward this script to the end user, the user needs to download the pnp cmdlets - which i want to avoid this additional steps.
thanks
- Jun 13, 2017
You could take a copy of the module folder after you have installed it yourself and get the users to place it next to the script in a folder called Modules.
Then within the script set $env:PSModulePath to include the location of the modules folder:
$path = Split-Path -parent $MyInvocation.MyCommand.Definition if ($env:PSModulePath -notlike "*$path\Modules") { "Adding ;$path\Modules to PSModulePath" | Write-Debug $env:PSModulePath += ";$path\Modules" }