Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
powershell shell diff
생성일
6년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
93 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
95 행
복사
80 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
82 행
복사
복사
복사됨
복사
복사됨
function Get-
S
POFolderFiles
function Get-
s
POFolderFiles
{
{
복사
복사됨
복사
복사됨
param
(
param
(
[Parameter(Mandatory
=
$true,Position
=
1)]
[Parameter(Mandatory
=
$true,Position
=
1)]
[string]$Username,
[string]$Username,
[Parameter(Mandatory
=
$true,Position
=
2)]
[Parameter(Mandatory
=
$true,Position
=
2)]
[string]$Url,
[string]$Url,
[Parameter(Mandatory
=
$true,Position
=
3)]
[Parameter(Mandatory
=
$true,Position
=
3)]
$password,
$password,
[Parameter(Mandatory
=
$true,Position
=
4)]
[Parameter(Mandatory
=
$true,Position
=
4)]
[string]$ListTitle
,
[string]$ListTitle
[Parameter(Mandatory=$true,Position=5)]
)
[string]$CSVPath
)
복사
복사됨
복사
복사됨
$ctx
=
New-Object Microsoft.SharePoint.Client.ClientContext
($Url)
$ctx
=
New-Object Microsoft.SharePoint.Client.ClientContext
($Url)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials
($Username,
$password)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials
($Username,
$password)
$ctx.Load($ctx.Web)
$ctx.Load($ctx.Web)
$ctx.ExecuteQuery()
$ctx.ExecuteQuery()
복사
복사됨
복사
복사됨
$ll
=
$ctx.Web.Lists.GetByTitle($ListTitle)
$ll
=
$ctx.Web.Lists.GetByTitle($ListTitle)
$ctx.Load($ll)
$ctx.Load($ll)
$ctx.ExecuteQuery()
$ctx.ExecuteQuery()
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
복사
복사됨
복사
복사됨
$spqQuery.ViewXml =
"<View Scope='RecursiveAll'
/>";
$spqQuery.ViewXml =
"<View Scope='RecursiveAll'
><RowLimit>100</RowLimit></View>";
$itemki=$ll.GetItems($spqQuery)
$ctx.Load($itemki)
$ctx.ExecuteQuery()
복사
복사됨
복사
복사됨
foreach(
$item
in
$itemki)
do {
{
$item
ki = $ll.GetItems($spqQuery)
$ctx.Load(
$itemki)
$ctx.ExecuteQuery()
복사
복사됨
복사
복사됨
Write-Host $item["FileRef"]
foreach
($item
in $itemki)
$file =
{
$ctx.Web.GetFileByServerRelativeUrl
($item
["FileRef"]);
$ctx.Load($file)
$ctx.Load($file.Versions)
$ctx.ExecuteQuery()
if ($file.Versions.Count -eq 0)
{
$obj=New-Object PSObject
$obj | Add-Member NoteProperty ServerRelativeUrl($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef($item["FileLeafRef"])
$obj | Add-Member NoteProperty Versions("No Versions Available")
복사
복사됨
복사
복사됨
$obj | export-csv -Path $CSVPath -Append
Write-Host $item["FileRef"]
$file =
$ctx.Web.GetFileByServerRelativeUrl($item["FileRef"]);
$ctx.Load($file)
$ctx.Load($file.Versions)
$ctx.ExecuteQuery()
if ($file.Versions.Count -eq 0)
{
$obj = New-Object PSObject
$obj | Add-Member NoteProperty ServerRelativeUrl ($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef ($item["FileLeafRef"])
$obj | Add-Member NoteProperty Versions ("No Versions Available")
}
else
{
$file.Versions.DeleteAll()
try { $ctx.ExecuteQuery()
$obj = New-Object PSObject
$obj | Add-Member NoteProperty ServerRelativeUrl ($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef ($item["FileLeafRef"])
$obj | Add-Member NoteProperty Versions ($file.Versions.Count + " versions were deleted")
}
}
복사
복사됨
복사
복사됨
else
catch {
{
$obj
=
New-Object PSObject
$file.Versions.DeleteAll()
$obj | Add-Member NoteProperty ServerRelativeUrl
($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef
($item["FileLeafRef"])
try { $ctx.ExecuteQuery()
$obj | Add-Member NoteProperty Versions
($file.Versions.Count + " versions. Failed to delete")
$obj=New-Object PSObject
$obj | Add-Member NoteProperty ServerRelativeUrl($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef($item["FileLeafRef"])
$obj | Add-Member NoteProperty Versions($file.Versions.Count + " versions were deleted")
$obj | export-csv -Path $CSVPath -Append
}
catch {
$obj
=
New-Object PSObject
$obj | Add-Member NoteProperty ServerRelativeUrl
($file.ServerRelativeUrl)
$obj | Add-Member NoteProperty FileLeafRef
($item["FileLeafRef"])
$obj | Add-Member NoteProperty Versions
($file.Versions.Count + " versions. Failed to delete")
$obj | export-csv -Path $CSVPath -Append
}
}
}
복사
복사됨
복사
복사됨
}
}
$spqQuery.ListItemCollectionPosition = $itemki.ListItemCollectionPosition
}
} while ($itemki.ListItemCollectionPosition)
}
}
#Paths to SDK
#Paths to SDK
복사
복사됨
복사
복사됨
Add-Type -Path "
c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
\Microsoft.SharePoint.Client.dll"
Add-Type -Path "
.\Lib
\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 "
.\Lib
\Microsoft.SharePoint.Client.Runtime.dll"
#Enter the data
#Enter the data
복사
복사됨
복사
복사됨
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
$Url
=
"https://
TODO-my
.sharepoint.com/
personal/TODO_SITE_NAME"
$username="trial@trialtrial125.onmicrosoft.com"
$Url
=
"https://
trialtrial125
.sharepoint.com/
sites/teamsitewithlibraries"
$ListTitle="Not-Empty-Document-Library"
$csvPath="C:\Users\ivo\Desktop\testpath114.csv"
복사
복사됨
복사
복사됨
$username = "TODO_USERNAME"
$AdminPassword = ConvertTo-SecureString -String "TODO_PASSWORD" -AsPlainText -Force
#$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
복사
복사됨
복사
복사됨
Get-sPOFolderFiles -User
n
ame $username -Url $Url -password $AdminPassword -ListTitle $ListTitle
-CSVPath $csvPath
#$ListTitle = "文档"
$ListTitle="Documents"
Get-sPOFolderFiles -User
N
ame $username -Url $Url -password $AdminPassword -ListTitle $ListTitle
저장된 비교 결과
원본
파일 열기
function Get-SPOFolderFiles { param ( [Parameter(Mandatory=$true,Position=1)] [string]$Username, [Parameter(Mandatory=$true,Position=2)] [string]$Url, [Parameter(Mandatory=$true,Position=3)] $password, [Parameter(Mandatory=$true,Position=4)] [string]$ListTitle, [Parameter(Mandatory=$true,Position=5)] [string]$CSVPath ) $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password) $ctx.Load($ctx.Web) $ctx.ExecuteQuery() $ll=$ctx.Web.Lists.GetByTitle($ListTitle) $ctx.Load($ll) $ctx.ExecuteQuery() $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery $spqQuery.ViewXml ="<View Scope='RecursiveAll' />"; $itemki=$ll.GetItems($spqQuery) $ctx.Load($itemki) $ctx.ExecuteQuery() foreach($item in $itemki) { Write-Host $item["FileRef"] $file = $ctx.Web.GetFileByServerRelativeUrl($item["FileRef"]); $ctx.Load($file) $ctx.Load($file.Versions) $ctx.ExecuteQuery() if ($file.Versions.Count -eq 0) { $obj=New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions("No Versions Available") $obj | export-csv -Path $CSVPath -Append } else { $file.Versions.DeleteAll() try { $ctx.ExecuteQuery() $obj=New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions($file.Versions.Count + " versions were deleted") $obj | export-csv -Path $CSVPath -Append } catch { $obj=New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions($file.Versions.Count + " versions. Failed to delete") $obj | export-csv -Path $CSVPath -Append } } } } #Paths to SDK 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" #Enter the data $AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString $username="trial@trialtrial125.onmicrosoft.com" $Url="https://trialtrial125.sharepoint.com/sites/teamsitewithlibraries" $ListTitle="Not-Empty-Document-Library" $csvPath="C:\Users\ivo\Desktop\testpath114.csv" Get-sPOFolderFiles -Username $username -Url $Url -password $AdminPassword -ListTitle $ListTitle -CSVPath $csvPath
수정본
파일 열기
function Get-sPOFolderFiles { param( [Parameter(Mandatory = $true,Position = 1)] [string]$Username, [Parameter(Mandatory = $true,Position = 2)] [string]$Url, [Parameter(Mandatory = $true,Position = 3)] $password, [Parameter(Mandatory = $true,Position = 4)] [string]$ListTitle ) $ctx = New-Object Microsoft.SharePoint.Client.ClientContext ($Url) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials ($Username,$password) $ctx.Load($ctx.Web) $ctx.ExecuteQuery() $ll = $ctx.Web.Lists.GetByTitle($ListTitle) $ctx.Load($ll) $ctx.ExecuteQuery() $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery $spqQuery.ViewXml = "<View Scope='RecursiveAll'><RowLimit>100</RowLimit></View>"; do { $itemki = $ll.GetItems($spqQuery) $ctx.Load($itemki) $ctx.ExecuteQuery() foreach ($item in $itemki) { Write-Host $item["FileRef"] $file = $ctx.Web.GetFileByServerRelativeUrl($item["FileRef"]); $ctx.Load($file) $ctx.Load($file.Versions) $ctx.ExecuteQuery() if ($file.Versions.Count -eq 0) { $obj = New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl ($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef ($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions ("No Versions Available") } else { $file.Versions.DeleteAll() try { $ctx.ExecuteQuery() $obj = New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl ($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef ($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions ($file.Versions.Count + " versions were deleted") } catch { $obj = New-Object PSObject $obj | Add-Member NoteProperty ServerRelativeUrl ($file.ServerRelativeUrl) $obj | Add-Member NoteProperty FileLeafRef ($item["FileLeafRef"]) $obj | Add-Member NoteProperty Versions ($file.Versions.Count + " versions. Failed to delete") } } } $spqQuery.ListItemCollectionPosition = $itemki.ListItemCollectionPosition } while ($itemki.ListItemCollectionPosition) } #Paths to SDK Add-Type -Path ".\Lib\Microsoft.SharePoint.Client.dll" Add-Type -Path ".\Lib\Microsoft.SharePoint.Client.Runtime.dll" #Enter the data $Url = "https://TODO-my.sharepoint.com/personal/TODO_SITE_NAME" $username = "TODO_USERNAME" $AdminPassword = ConvertTo-SecureString -String "TODO_PASSWORD" -AsPlainText -Force #$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString #$ListTitle = "文档" $ListTitle="Documents" Get-sPOFolderFiles -UserName $username -Url $Url -password $AdminPassword -ListTitle $ListTitle
비교하기