Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- feedback: Array
- (
- [0] => This script demonstrates how the PowerShell Toolkit can be used to automate small workflows
- [1] => Start with loading PowerShell Toolkit modules.
- [2] => Now let's create a new empty TM.
- [3] => A TM created at: c:\Projects\PowerShellToolKit\PowerShellTest\SampleTM\new_en_de.sdltm
- [4] => Now let's create a new project which will use the newly created TM.
- [5] =>
- [6] =>
- [7] => Directory: C:\Projects\PowerShellToolKit\PowerShellTest\SampleFiles
- [8] =>
- [9] =>
- [10] => Mode LastWriteTime Length Name
- [11] => ---- ------------- ------ ----
- [12] => -a--- 12/06/2018 12:13 p.m. 38 sampleTestFile.txt
- [13] => New-Object : Exception calling ".ctor" with "2" argument(s): "License check
- [14] => failed, with exception: System.UnauthorizedAccessException: Access to the path
- [15] => '\Microsoft Corporation\Microsoft� Windows� Operating System\6.3.9600.17396'
- [16] => is denied.
- [17] => at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
- [18] => at System.IO.Directory.InternalCreateDirectory(String fullPath, String
- [19] => path, Object dirSecurityObj, Boolean checkHost)
- [20] => at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean
- [21] => checkHost)
- [22] => at System.IO.Directory.CreateDirectory(String path)
- [23] => at System.Windows.Forms.Application.GetDataPath(String basePath)
- [24] => at System.Windows.Forms.Application.get_UserAppDataPath()
- [25] => at Sdl.Core.PluginFramework.PluginManager.CreateDefaultPluginCache()
- [26] => at Sdl.Core.PluginFramework.PluginManager.get_DefaultPluginRegistry()
- [27] => at Sdl.Common.Licensing.Provider.Core.LicensingProviderManager.get_Licensing
- [28] => ProviderFactories()
- [29] => at Sdl.Common.Licensing.Provider.Core.LicensingProviderManager.CreateProvide
- [30] => r(ILicensingProviderConfiguration config, String preferredProviderId)
- [31] => at Sdl.Common.Licensing.Manager.ApplicationLicenseManager.GetCurrentLicensin
- [32] => gProvider()
- [33] => at Sdl.Common.Licensing.Manager.ApplicationLicenseManager.GetProduct()
- [34] => at Sdl.Common.Licensing.Manager.ApplicationLicenseManager.GetLicenseWithoutC
- [35] => onsumingSeatsOrUsages()
- [36] => at Sdl.ProjectAutomation.FileBased.FileBasedProject.CheckLicense()"
- [37] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [38] => er.psm1:109 char:23
- [39] => + $fileBasedProject = New-Object
- [40] => Sdl.ProjectAutomation.FileBased.FileBasedProjec ...
- [41] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [42] => ~~~~~~~~~
- [43] => + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
- [44] => tionException
- [45] => + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
- [46] => Shell.Commands.NewObjectCommand
- [47] =>
- [48] => You cannot call a method on a null-valued expression.
- [49] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [50] => er.psm1:113 char:2
- [51] => + $projectFiles = $fileBasedProject.AddFolderWithFiles($sourceFilesFolder,
- [52] => $false ...
- [53] => +
- [54] => ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [55] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [56] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [57] =>
- [58] => New-Object : Exception calling ".ctor" with "1" argument(s): "Unable to find
- [59] => the specified file."
- [60] => At
- [61] => C:\Windows\system32\WindowsPowerShell\v1.0\Modules\TMHelper\TMHelper.psm1:41
- [62] => char:2
- [63] => + New-Object
- [64] => Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemory ...
- [65] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [66] => ~~~~~~
- [67] => + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
- [68] => tionException
- [69] => + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
- [70] => Shell.Commands.NewObjectCommand
- [71] =>
- [72] => You cannot call a method on a null-valued expression.
- [73] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [74] => er.psm1:119 char:3
- [75] => + [Sdl.ProjectAutomation.Core.TranslationProviderConfiguration]
- [76] => $tmConfig = $fil ...
- [77] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [78] => ~~~~~~~~~
- [79] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [80] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [81] =>
- [82] => You cannot call a method on a null-valued expression.
- [83] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [84] => er.psm1:121 char:3
- [85] => + $tmConfig.Entries.Add($entry);
- [86] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [87] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [88] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [89] =>
- [90] => The property 'OverrideParent' cannot be found on this object. Verify that the
- [91] => property exists and can be set.
- [92] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [93] => er.psm1:122 char:3
- [94] => + $tmConfig.OverrideParent = $true;
- [95] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [96] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [97] => + FullyQualifiedErrorId : PropertyNotFound
- [98] =>
- [99] => You cannot call a method on a null-valued expression.
- [100] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [101] => er.psm1:123 char:3
- [102] => +
- [103] => $fileBasedProject.UpdateTranslationProviderConfiguration($tmTargetLanguage, $t
- [104] => ...
- [105] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [106] => ~~~~~~~~~
- [107] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [108] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [109] =>
- [110] => You cannot call a method on a null-valued expression.
- [111] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [112] => er.psm1:127 char:2
- [113] => + [Sdl.ProjectAutomation.Core.ProjectFile[]] $projectFiles =
- [114] => $fileBasedProject.Ge ...
- [115] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [116] => ~~~~~~
- [117] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [118] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [119] =>
- [120] => You cannot call a method on a null-valued expression.
- [121] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [122] => er.psm1:131 char:2
- [123] => + Validate-Task
- [124] => $fileBasedProject.RunAutomaticTask($sourceFilesGuids,[Sdl.Project ...
- [125] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [126] => ~~~~~~
- [127] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [128] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [129] =>
- [130] => You cannot call a method on a null-valued expression.
- [131] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [132] => er.psm1:132 char:2
- [133] => + Validate-Task
- [134] => $fileBasedProject.RunAutomaticTask($sourceFilesGuids,[Sdl.Project ...
- [135] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [136] => ~~~~~~
- [137] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [138] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [139] =>
- [140] => You cannot call a method on a null-valued expression.
- [141] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [142] => er.psm1:133 char:2
- [143] => + Validate-Task
- [144] => $fileBasedProject.RunAutomaticTask($sourceFilesGuids,[Sdl.Project ...
- [145] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [146] => ~~~~~~
- [147] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [148] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [149] =>
- [150] => You cannot call a method on a null-valued expression.
- [151] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [152] => er.psm1:139 char:3
- [153] => + $targetFiles =
- [154] => $fileBasedProject.GetTargetLanguageFiles($targetLanguage);
- [155] => +
- [156] => ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [157] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [158] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [159] =>
- [160] => You cannot call a method on a null-valued expression.
- [161] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [162] => er.psm1:142 char:3
- [163] => + Validate-Task
- [164] => $fileBasedProject.RunAutomaticTask($targetFilesGuids,[Sdl.Projec ...
- [165] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [166] => ~~~~~~~~~
- [167] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [168] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [169] =>
- [170] => You cannot call a method on a null-valued expression.
- [171] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [172] => er.psm1:143 char:3
- [173] => + Validate-Task
- [174] => $fileBasedProject.RunAutomaticTask($targetFilesGuids,[Sdl.Projec ...
- [175] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [176] => ~~~~~~~~~
- [177] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [178] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [179] =>
- [180] => You cannot call a method on a null-valued expression.
- [181] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [182] => er.psm1:147 char:2
- [183] => + $fileBasedProject.Save();
- [184] => + ~~~~~~~~~~~~~~~~~~~~~~~~
- [185] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [186] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [187] =>
- [188] => A new project creation completed.
- [189] => Now open project and get analyze statistics.
- [190] => You cannot call a method on a null-valued expression.
- [191] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [192] => er.psm1:159 char:2
- [193] => + $fileBasedProject = New-Object
- [194] => Sdl.ProjectAutomation.FileBased.FileBasedProject ...
- [195] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [196] => ~~~~~~
- [197] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [198] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [199] =>
- [200] => You cannot call a method on a null-valued expression.
- [201] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [202] => er.psm1:169 char:2
- [203] => + $projectStatistics = $project.GetProjectStatistics();
- [204] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [205] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [206] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [207] =>
- [208] => Now for each target language create translation package.
- [209] => You cannot call a method on a null-valued expression.
- [210] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ProjectHelper\ProjectHelp
- [211] => er.psm1:19 char:23
- [212] => + foreach($taskfile in $project.GetTargetLanguageFiles($language))
- [213] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [214] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [215] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [216] =>
- [217] => You cannot call a method on a null-valued expression.
- [218] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PackageHelper\PackageHelp
- [219] => er.psm1:22 char:2
- [220] => + [Sdl.ProjectAutomation.Core.ManualTask] $task =
- [221] => $projectToProcess.CreateManualT ...
- [222] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [223] => ~~~~~~
- [224] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [225] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [226] =>
- [227] => You cannot call a method on a null-valued expression.
- [228] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PackageHelper\PackageHelp
- [229] => er.psm1:24 char:2
- [230] => + [Sdl.ProjectAutomation.Core.ProjectPackageCreation] $package =
- [231] => $projectToProces ...
- [232] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [233] => ~~~~~~
- [234] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [235] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [236] =>
- [237] => You cannot call a method on a null-valued expression.
- [238] => At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PackageHelper\PackageHelp
- [239] => er.psm1:26 char:2
- [240] => + $projectToProcess.SavePackageAs($package.PackageId, $packagePath);
- [241] => + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [242] => + CategoryInfo : InvalidOperation: (:) [], RuntimeException
- [243] => + FullyQualifiedErrorId : InvokeMethodOnNull
- [244] =>
- [245] => Completed.
- [246] =>
- [247] =>
- )
Advertisement
Add Comment
Please, Sign In to add comment