diff --git a/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md index c6d6dd02..9f7e2ae0 100644 --- a/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md +++ b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md @@ -1,46 +1,35 @@ The script requires SharePoint Online SDK. - - What does it do? The script finds all the checked out files in a single library and checks them in. - - How to use? 1. Download and open the file. 2. Refer the paths to the SDK: - - -PowerShell -#Paths to SDK -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" - - +```PowerShell +#Paths to SDK +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" +``` 3. Enter your credentials, the url of the site and the name of the list -PowerShell -#Enter the data +```PowerShell +#Enter the data $AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString -$username="AwesomeMachine\administrator" +$username="AwesomeMachine\administrator" $Url="http://ThisIsSharePoint/sites/site1" -$ListTitle="Documents" - +$ListTitle="Documents" +``` 4. Save the file, close, and run the script in Powershell. - - The files will have the following check-in in their version history: - - If you want to change the comment's content, modify the following line in the script: -PowerShell -$file.CheckIn('Checked in automatically', 'MajorCheckIn') - +```PowerShell +\$file.CheckIn('Checked in automatically', 'MajorCheckIn') +``` \ No newline at end of file diff --git a/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/CheckOutModule.psm1 b/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/CheckOutModule.psm1 index 1b484a8f..b04d2400 100644 --- a/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/CheckOutModule.psm1 +++ b/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/CheckOutModule.psm1 @@ -2,7 +2,7 @@ This is a Powershell module with a single function. Not very useful, it would make more sense as a function, 2019-me may say to 2014-me, but it was one of the first steps to create SPOMod and I keep it out of sentiment. ># -function Set-Checkout{ +function Set-Checkout { param ( [Parameter(Mandatory=$true,Position=1)] [string]$Username, diff --git a/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/description.md b/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/description.md index ca94bf75..34ebbba4 100644 --- a/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/description.md +++ b/Lists and Libraries Management/Checkout/Powershell/Force your users to checkout documents using Powershell/description.md @@ -5,48 +5,55 @@ It corresponds to the following GUI option: After import you can use Set-Checkout cmdlet with the following parameters: + ```powershell [string]$Username - ``` +``` + The string specifies admin of a given site collection where you want to enforce Checkout Requirement or disable the enforcement + ```powershell [string]$Url ``` -Specifies the url of a site where you want to enable or disable Checkout Requirement for all lists + +Specifies the url of a site where you want to enable or disable Checkout Requirement for all lists + ```powershell [bool]$IncludeSubsites=$false, - ``` +``` + Specifies whether the cmdlet should also change the Checkout Requirement in the subsites + ```powershell [string]$AdminPassword, ``` + Admin' password + ```powershell [bool]$ForceCheckout=$true ``` + Specifies whether the documents should be checked out ($true) or disables the Checkout Requirement ($false).
-## ***Example:*** +## **_Example:_** **PS C:\Windows\system32**> **Import-Module d:\Powershell\CheckOutModule2.psm1** PS C:\Windows\system32> Set-Checkout -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlibraries -IncludeSubsites $true -AdminPassword Password -ForceCheckout $true -It uses the following prerequisites. If those libraries are in different location on your computer, please edit the ```.psm1``` file! - - +It uses the following prerequisites. If those libraries are in different location on your computer, please edit the `.psm1` file! ```PowerShell -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" - ``` - +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" +``` ### Results: -

+

Enjoy and please share feedback! diff --git a/Lists and Libraries Management/Get all lists not used since/description.md b/Lists and Libraries Management/Get all lists not used since/description.md index a164878b..16b26809 100644 --- a/Lists and Libraries Management/Get all lists not used since/description.md +++ b/Lists and Libraries Management/Get all lists not used since/description.md @@ -1,33 +1,21 @@ A short script that retrieves all lists from a site that haven't been modified for a while. - +Please mind the difference between used and modified. A list of countries or client contacts that serve as lookup for other lists may not be changed often but is still widely used. -Please mind the difference between used and modified. A list of countries or client contacts that serve as lookup for other lists may not be changed often but is still widely used. +You need SharePoint Online SDK to run it. - - - - -You need SharePoint Online SDK to run it. - -Please do NOT enter your password in the file! You will be asked for it during script execution. +Please do NOT enter your password in the file! You will be asked for it during script execution. Please adjust the following parameters before execution: - +```PowerShell +#Paths to SDK +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" -PowerShell -#Paths to SDK -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" -Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" - -#Enter the data +#Enter the data $username="ana@etr56.onmicrosoft.com" -$Url="https://etr56.sharepoint.com/sites/demigtest11-2" -$olderThan = "2019-09-30" - - - +$Url="https://etr56.sharepoint.com/sites/demigtest11-2" +\$olderThan = "2019-09-30" +``` Sample results - -