Issue: When running script from designated share as an administrator, the script fails to run.
Expected behavior: Script makes connection to local WSUS database for cleanup.
Error Log:
PS E:\wsus-cleanup-master> E:\wsus-cleanup-master\WSUS-Cleanup.ps1
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At E:\wsus-cleanup-master\WSUS-Cleanup.ps1:12 char:67
running with full privileges
Cannot invoke method. Method invocation is supported only on core types in this language mode.
At E:\wsus-cleanup-master\WSUS-Cleanup.ps1:74 char:10
if ( -not [System.Diagnostics.EventLog]::SourceExists($log_source ...
Environment: Windows Server 2016 Datacenter Edition
Additional Comments: No items added to config file. Script running on server where WSUS is hosted so $SqlServer and $SqlDB variables are empty
Issue: When running script from designated share as an administrator, the script fails to run.
Expected behavior: Script makes connection to local WSUS database for cleanup.
Error Log:
Environment: Windows Server 2016 Datacenter Edition Additional Comments: No items added to config file. Script running on server where WSUS is hosted so $SqlServer and $SqlDB variables are empty