Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
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
違いを見つける