sharepoint on premise – Looping through all documents in a site through powershell script

I’m new to powershell and trying to loop through all document libraries of a site using below code:

$webs = (Get-SPSite “XXX” | Get-SPWeb -Limit all -ErrorAction SilentlyContinue)

$Lists = $webs.Lists

$ListItemCollection = @()

Foreach($List in $Lists) {

if($List.BaseType -eq "DocumentLibrary"){

    $list.Items | Where-Object { $_("Choice Column") -eq $null } | foreach {

        $ExportItem = New-Object PSObject
        $ExportItem | Add-Member -MemberType NoteProperty -name "URL" -value $_.URL
        $ExportItem | Add-Member -MemberType NoteProperty -name "Name" -value $_("Name")
        $ListItemCollection += $ExportItem

$ListItemCollection | Export-CSV “D:TestLogs.txt” -NoTypeInformation

The output in txt file contains those files also which doesn’t have the custom column(Choice Column).
Do I need to check if the Document library contains the custom field and if so how can i check it.

Please note we are using Sharepoint 2016 on-premise.


Do documents in Danish need to be translated for UK standard visa?

You should refer to the detailed guidance in

“If you submit a document that is not in English or Welsh, it must be accompanied by a full translation that can be independently verified by the Home Office. Each translated document must contain:

  • confirmation from the translator that it is an accurate translation of the original document

  • the date of the translation

  • the translator’s full name and signature

  • the translator’s contact details”

AFAIK, it is not typically necessary to get bank statements translated, given that the information provided is usually self-explanatory – a debit/credit is a debit/credit in any language.

icloud – Cannot backup Documents folder

I use the open source borg backup tool to make a daily backup of my Documents folder which is also on iCloud drive. I use a LaunchAgent stored in my local library directory to execute a bash script which takes care of the backup. The script also does a backup of another folder which is not on iCloud drive and this works just fine. However, the documents folder is not properly backup up. Just an empty folder is created. If I run the bash script manually, then all works fine. I suspect it is some security measure by Apple that prevents the automatic backup of the folder. Can’t help but think of this Apple ad

Does anyone know how to solve this? And no, I don’t want to use TimeMachine for a variety of reasons.

Making Users Prove They Have Reviewed The Information Security Policy Documents

I am looking for a way to hold the departments accountable and ensure they atleast review the policies that we have.  I was thinking about using adobe sign but don’t want to go cloud.  An application like those that make you scroll to the end then click agree would be nice if it kept track of the people who signed.  I’m looking for any recommendations, we have hundreds of users and docs.

Default All Documents view in a SharePoint document library got corrupted

Some how the default view (All Documents – …/Forms/AllItems.aspx) in a document library in SharePoint Online got corrupted and now shows gibberish:

“…PK!A�.fT(Content_Types).xml �(����n�0E����� �tQUUH},�HM?����/����;@��(�I6H0s�=xF��V� |���d� H�(!M����(�H��LY9�B ����h�uT���E�����YȬ���z�”���:�X �~0x�ܚ&��� ��l�b��� ɷ��$�Mc���+��@�j<�p�a�)�Y�:)q@��2T�=a!)�Æ������}���R@2e>�3�)tm����Fev���- ɡ�Wn�(!�w�*k+�I����q� ���폇Qp ��s/��W��c�R`����”…

As a temporary solution I created a new default view, but need to restore the old one at AllItems.aspx as users have links to it…

What is the best way to restore or repair the view?
Shall I delete the view and recreate new with the same AllItems.aspx address?

Thank you in advance.