this was before with old module installed
PS C:\temp\pswindowsupdate\PSWindowsUpdate> get-module
ModuleType Version Name ExportedCommands
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con…
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack…
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap…
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS…
Manifest 1.5.2.2 PSWindowsUpdate {Add-WUOfflineSync, Add-WUServiceManager, Get-WUHistory, G…
Binary 2.1.1.2 PSWindowsUpdate {Add-WUServiceManager, Enable-WURemoting, Get-WindowsUpdat…
I did a remove-module -name pswindowsupdate
Then install-module PSWindowsUpdate
PS C:\temp\pswindowsupdate\PSWindowsUpdate> get-module
ModuleType Version Name ExportedCommands
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con…
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack…
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap…
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS…
Manifest 1.5.2.2 PSWindowsUpdate {Add-WUOfflineSync, Add-WUServiceManager, Get-WUHistory, G…
PS C:\temp\pswindowsupdate\PSWindowsUpdate> Invoke-WUInstall -ComputerName TGCS011 -Script {ipmo PSWindowsUpdate; Get-WU
Install -AcceptAll | Out-File C:PSWindowsUpdate.log } -Confirm:$false –Verbose
VERBOSE: Populating RepositorySourceLocation property for module PSWindowsUpdate.
VERBOSE: Loading module from path ‘C:\Program
Files\WindowsPowerShell\Modules\PSWindowsUpdate\2.1.1.2\PSWindowsUpdate.psm1’.
VERBOSE: Loading module from path ‘C:\Program
Files\WindowsPowerShell\Modules\PSWindowsUpdate\2.1.1.2\PSWindowsUpdate.dll’.
VERBOSE: Populating RepositorySourceLocation property for module PSWindowsUpdate.
VERBOSE: Loading module from path
‘C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\1.5.2.2\PSWindowsUpdate.psm1’.
VERBOSE: Create schedule service object
VERBOSE: Performing the operation “Invoke WUInstall” on target “TGCS011”.
VERBOSE: Check PSWindowsUpdate module on TGCS011
Could not compare “1.5.2.2” to “2.1.1.2 1.5.2.2”. Error: “Cannot convert the “System.Object” value of type
“System.Object” to type “System.Version”.”
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\1.5.2.2\Invoke-WUInstall.ps1:103 char:9
- … if($ModuleTest -eq $null -or $ModuleTest.Version -lt $PSWUMo …
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: ( , RuntimeException
- FullyQualifiedErrorId : ComparisonFailure
VERBOSE: Connect to scheduler and register task on TGCS011.
VERBOSE: Invoke-WUInstall complete.
PS C:\temp\pswindowsupdate\PSWindowsUpdate>
It fails on the Could not compare “1.5.2.2” to “2.1.1.2 1.5.2.2”. Error: “Cannot convert the “System.Object” value of type
“System.Object” to type “System.Version”.”
I do not need to install this module on my remote computers correct?
Any ideas?
Thank you
Tom