다음을 통해 공유


Windows 10 마이그레이션 지침용 OneNote

중요

Windows 10 OneNote는 2025년 10월에 지원이 종료됩니다. 엔터프라이즈 고객은 Microsoft Store 및 Microsoft 365 구독에서 사용할 수 있는 Windows의 OneNote로 Windows 10 OneNote에서 전환해야 합니다. Windows의 OneNote는 새로운 기능과 업데이트를 제공하며 그룹 정책 통해 사용자 설정을 사용자 지정할 수 있습니다.

이 문서에서는 Windows 10 OneNote에서 Windows용 OneNote로 organization 마이그레이션하기 위한 지침을 제공합니다. 여기에는 사용자를 식별하고, 마이그레이션 스크립트를 사용자 지정하고, 프로세스 전체에서 데이터 무결성을 보장하기 위한 지침이 포함되어 있습니다. 마이그레이션 중에 중단을 최소화하고 사용자 데이터를 보호하는 데 도움이 되는 문제 해결 단계 및 모범 사례를 찾을 수 있습니다.

Windows 10 OneNote에서 사용자 식별:

Microsoft Intune 통해 Windows 10 OneNote를 사용하여 organization 사용자 또는 디바이스를 식별하려면 다음 단계에 따라 보고서를 실행합니다.

  • Intune 모든 서비스> 앱 | 로 이동합니다. 검색된 앱모니터>>, "Office.OneNote"를 검색합니다.
  • 부터 시작하는 16001.xxxxx.xxxxx.x애플리케이션 버전을 찾아 Windows 10 사용자에 대한 OneNote를 식별합니다. 최신 버전은 16001.14326.22094.0

    참고

    샘플 마이그레이션 스크립트는 버전의 Windows 10 디바이스에 대한 OneNote에서만 작동합니다.16001.14326.22094.0

샘플 스크립트 사용자 지정

샘플 스크립트를 실행하기 전에 앱이 설치되지 않은 경우 사용자 디바이스에서 Windows에 OneNote를 설치합니다. 자세한 내용은 OneNote 배포 가이드를 참조하세요.

Windows용 OneNote로 원활하게 마이그레이션하려면 조직에서 다음 샘플 스크립트를 사용자 지정하여 다음 단계를 순서대로 완료해야 합니다.

  1. Windows 10 대한 OneNote가 설치되어 있는지, 앱의 AppData 폴더에 대한 경로가 있는지(사용자가 이전에 앱을 열었는지 여부를 나타냅니다)를 확인하여 마이그레이션이 필요한지 확인합니다.
  2. 실행 파일이 디바이스에 있는지 확인하여 Windows용 OneNote가 설치되어 있는지 확인합니다.
  3. Windows 10 OneNote 버전을 확인하여 마이그레이션 중에 데이터 손실을 방지하는 중요한 기능이 있는 최신 버전에 있는지 확인합니다.

참고

이 스크립트는 16001.14326.22094 미만의 Windows 10 버전에 대해 OneNote가 있는 디바이스에는 작동하지 않습니다. IT 관리자는 organization 정책에 따라 이러한 디바이스를 업그레이드해야 합니다.

  1. Windows 10 프로세스에 대해 모든 OneNote를 종료합니다.
  2. 명령을 사용하여 샌드박스 폴더에 동기화되지 않은 섹션을 백업합니다 onenote-uwp://backup: .
  3. 샌드박스 내에 백업을 저장합니다.
    $localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\AppData\Local\OneNote\16.0\BackUp\.
  4. 동기화되지 않은 콘텐츠가 있는 섹션만 백업되고 각 폴더가 Notebook에 해당하는 폴더로 구성되었는지 확인합니다.
  5. UWPBackUpStatus.json 구문 분석하여 백업이 성공했는지 확인합니다.

경고

실패한 백업으로 제거하면 데이터가 손실될 수 있습니다.

  1. 백업 파일을 샌드박스 외부의 위치로 이동합니다.
    $localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\
    Windows 10 앱용 OneNote가 제거되면 샌드박스 경로가 삭제되기 때문에
  2. Windows 10 OneNote를 제거합니다.
  3. Windows 10 OneNote가 디바이스별로가 아니라 사용자별로 제거되었는지 확인합니다.
    이 프로세스는 공유 디바이스가 모든 계정에 대해 동기화되지 않은 노트를 제거하는 시나리오를 완화하는 데 도움이 됩니다.

중요

샘플 스크립트를 사용하기 전에 organization 특정 배포 및 마이그레이션 요구 사항에 맞게 사용자 지정해야 합니다.

#############################################
######   OneNote for Windows 10  ############
######   External Migration Script v6  ######
#############################################

## Optional: Helper function to write logs from script to UWPMigrationResult.log File and Console ##
function writeLogsToFileAndConsole {
    Param ([string]$logstring)
    $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
    $logstringWithTimestamp = "[$timestamp] $logstring"
    $backupFolder = [System.Environment]::GetFolderPath('LocalApplicationData') + "\Microsoft\OneNote\16.0\Backup"
    $outputFile = $backupFolder + "\UWPMigrationResult.log"

    if (-not (Test-Path $backupFolder))
    {
        New-Item -Path $backupFolder -ItemType Directory
    }

    if (-not (Test-Path $outputFile))
    {
        New-Item -Path $outputFile -ItemType File
    }

    Add-content $outputFile -value "$logstringWithTimestamp"
    Write-Host "$logstringWithTimestamp"
}

## Check if OneNote for Windows 10 is installed and if the AppData path exists ##
function checkOneNoteUWPInstall {
    $folderPath = "$env:LOCALAPPDATA\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\LocalState\AppData\Local\OneNote"
    $uwpApp = Get-AppxPackage | Where-Object {$_.Name -eq "Microsoft.Office.OneNote"}
    if ($null -ne $uwpApp)
    {
        $uwpVersion = $uwpApp.Version
        $uwpVersionObject = [System.Version]$uwpVersion
        writeLogsToFileAndConsole "OneNote UWP app version: $uwpVersion"
    }
    else {
        writeLogsToFileAndConsole "OneNote UWP App is not installed"
        exit
    }

    if (Test-Path $folderPath)
    {
        Write-Host "OneNote UWP AppData folder detected"
    }
    else {
        ($null -ne $uwpApp) 
        $uwpApp | Remove-AppxPackage
        writeLogsToFileAndConsole "OneNote AppData folder does not exist and OneNote UWP will now be uninstalled"
        exit
    }
}

## Check if OneNote for Windows is installed by checking the existence of the executable file ##
function checkOneNoteWin32Install {
    $oneNotePath = Join-Path $env:ProgramFiles "Microsoft Office\root\Office16\ONENOTE.EXE"
    
    if (Test-Path $oneNotePath) {
        writeLogsToFileAndConsole "OneNote Win32 is installed"   
    } else {
        writeLogsToFileAndConsole "OneNote Win32 is not installed"
        exit
    }
 }

## Check version of the user's OneNote for Windows 10 app ##
function checkUWPVersion {
    $uwpApp = Get-AppxPackage | Where-Object {$_.Name -eq "Microsoft.Office.OneNote"}
    if ($null -ne $uwpApp)
    {
        $uwpVersion = $uwpApp.Version
        $uwpVersionObject = [System.Version]$uwpVersion

        $updatedVersion = "16001.14326.22094.0"
        $updatedVersionObject = [System.Version]$updatedVersion

        $unsupportedVersion = "16001.14327.10000.0"
        $unsupportedVersionObject = [System.Version]$unsupportedVersion

        if ($uwpVersionObject -ge $unsupportedVersionObject)
        {
            writeLogsToFileAndConsole "Unsupported version of OneNote UWP app. Please check the Microsoft Store for updates"
            exit
        }

        if ($uwpVersionObject -lt $updatedVersionObject)
        {
            writeLogsToFileAndConsole "You must upgrade OneNote UWP to a version higher than 16.0.14326.21802. Please check the Microsoft Store"
            exit
        }
        else
        {
            writeLogsToFileAndConsole "OneNote UWP will backup and uninstall"
        }
    }
    else
    {
        writeLogsToFileAndConsole "No OneNote UWP detected therefore no need for migration"
        exit
    }
}

## Terminate the OneNote for Windows 10 app before executing the rest of the migration script ##
function killProcess {
    if (Get-Process -Name "OneNoteIm" -ErrorAction SilentlyContinue)
    {
        try
        {
            $uwpProcess = Get-Process -Name "OneNoteIm"
            Stop-Process -Id $uwpProcess.Id -Force
            Start-Sleep -Seconds 10
        }
        catch
        {
            writeLogsToFileAndConsole "An error occurred when killing the current OneNote UWP process: $($_.Exception.GetType().FullName)"
            writeLogsToFileAndConsole "$($_.Exception.Message)"
            exit
        }

        writeLogsToFileAndConsole "OneNote UWP process killed"
    }
}

## Run the protocol to back up unsynced sections into the sandbox path ##
function launchBackUp {
    try
    {
        Start-Process "onenote-uwp://backup:"
        Start-Sleep -Seconds 60
        writeLogsToFileAndConsole "OneNote UWP backup initiated"
    }
    catch
    {
        writeLogsToFileAndConsole "An error occurred when starting the backup: $($_.Exception.GetType().FullName)"
        writeLogsToFileAndConsole "$($_.Exception.Message)"
        exit
    }

    writeLogsToFileAndConsole "OneNote UWP backup in progress"
}

## Parse the results in the json files to validate that the backup was successful ##
function parseJson {
    try
    {
        $localAppDataPath = [System.Environment]::GetFolderPath('LocalApplicationData')
        $jsonPath = "$localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\LocalState\AppData\Local\OneNote\16.0\UWPBackUpStatus.json"
        if(!(test-path $jsonPath))
        {
            writeLogsToFileAndConsole "Backup Json file path is not valid"
            exit
        }

        $backupJsonFileContent = Get-Content -Path $jsonPath -Raw | ConvertFrom-Json
        $status = $backupJsonFileContent."UWP Backup Status"
        if ($status -eq "Completed")
        {
            $jsonPath2 = "$localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\LocalState\AppData\Local\OneNote\16.0\UWPSyncStatus.json"
            if(test-path $jsonPath2)
            {
                $syncStatusJsonContent = Get-Content -Raw -Path $jsonPath2
                $syncStatusJsonObject = COnvertFrom-Json $syncStatusJsonContent
                foreach ($key in $syncStatusJsonObject.PSObject.Properties)
                {
                    $value = $syncStatusJsonObject.$($key.Name)
                    if ($value.StartsWith("Contains pending outbounding changes: true,"))
                    {
                        if ($backupJsonFileContent."Number of sections Backed up" -eq 0)
                        {
                            writeLogsToFileAndConsole "No error occurred when backing up but outbounding changes were not backed up successfully"
                            exit
                        }
                        else
                        {
                            break
                        }
                    }
                }
            }

            writeLogsToFileAndConsole "OneNote UWP backup is completed and status is saved"
        }
        elseif ($status -eq "")
        {
            writeLogsToFileAndConsole "$status"
            writeLogsToFileAndConsole "No error occurred but backup did not finish. We cannot continue migration. Consider increasing the Start-Sleep time in line 130 and rerun the script"
            exit
        }
        else
        {
            writeLogsToFileAndConsole "No error occurred but backup status is $status. We cannot continue migration. Consider increasing the Start-Sleep time in line 130 and rerun the script"
            exit
        }
    }
    catch
    {
        writeLogsToFileAndConsole "An error occurred when finishing the backup: $($_.Exception.GetType().FullName)"
        writeLogsToFileAndConsole "$($_.Exception.Message)"
        exit
    }
}

## Copy the backup files to a directory outside of the sandbox path ##
function moveBackup {
    try
    {
        $localAppDataPath = [System.Environment]::GetFolderPath('LocalApplicationData')
        $sourcePath = "$localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\LocalState\AppData\Local\OneNote\16.0\BackUp\"
        $destinationPath = [System.Environment]::GetFolderPath('LocalApplicationData') + "\Microsoft\OneNote\16.0\Backup\"

        Copy-Item -Path $sourcePath\* -Destination $destinationPath -Recurse -Force

        $sourcePath = "$localAppDataPath\Packages\Microsoft.Office.OneNote_8wekyb3d8bbwe\LocalState\AppData\Local\OneNote\16.0"
        $fileExtensions = "*.json", "*.txt"
        foreach ($fileExtension in $fileExtensions)
        {
            $files = Get-ChildItem -Path $sourcePath -Filter $fileExtension
            foreach ($file in $files)
            {
                Copy-Item -Path $file.FullName -Destination $destinationPath -Force
            }
        }
    }
    catch
    {
        writeLogsToFileAndConsole "An error occurred when moving the backup files: $($_.Exception.GetType().FullName)"
        writeLogsToFileAndConsole "$($_.Exception.Message)"
        exit
    }

    writeLogsToFileAndConsole "Backup files copied successfully from $sourcePath to $destinationPath"
 }

## Uninstall the OneNote for Windows 10 app ##
function uninstallUWP {
    $uwpApp = Get-AppxPackage | Where-Object {$_.Name -eq "Microsoft.Office.OneNote"}
    if ($null -ne $uwpApp)
    {
        $uwpApp | Remove-AppxPackage
        writeLogsToFileAndConsole "OneNote UWP version uninstalled"
    }
}

function MainRoutine {
    checkOneNoteWin32Install
    checkOneNoteUWPInstall
    checkUWPVersion
    killProcess
    launchBackUp
    parseJson
    moveBackup
    uninstallUWP
}

## Executes the main routine ##
MainRoutine

마이그레이션된 노트 액세스

마이그레이션 후 사용자는 다음을 통해 노트를 검색할 수 있습니다.

  1. Windows에서 새 OneNote 애플리케이션을 엽니다.
  2. 계정에 로그인합니다.
  3. 전자 필기장을 엽니다.

메모가 누락된 경우 이전 단계에서 만든 백업 폴더를 검사.

Windows에서 OneNote를 통해 백업을 검토하려면 다음을 수행합니다.

  • 파일 -> 백업 열기 -> 백업 파일 경로로 이동합니다.

문제 해결

  • UWPBackupStatus.json 백업 및 동기화 상태에 대한 자세한 내용은 사용자의 백업 폴더에 있는 및 UWPSyncStatus.json 파일을 검토합니다.

  • 마이그레이션 중에 발생한 오류는 이전에 생성된 백업에 있는 로그 파일(1.d단계)을 참조하세요.

명령이 실패하는 onenote-uwp://backup: 경우:

  • Windows 10 앱용 OneNote가 프로토콜에 연결된 onenote-uwp 기본 앱인지 확인합니다.
  • Windows 10 OneNote에 대한 올바른 프로토콜 첨부 파일을 확인하려면 관련 지원 문서를 참조하세요.

주의

온라인에서 찾은 명령을 사용할 때는 주의해야 합니다. 항상 제어된 환경에서 명령을 배포하기 전에 organization 전체에서 명령을 테스트하여 Remove-AppxPackage 명령으로 인한 의도하지 않은 결과를 방지합니다.

추가 지원 또는 문의는 Microsoft 지원 문의하세요.