Skip to content

Bits issue? #206

@CiREdrol

Description

@CiREdrol

Forgive me if this is not an issue with the script however I'm not sure what is wrong. Fors some reason I'm getting BITS issues when I download. I'm using powershell 7.3 with lasted WMF 5.1 installed. BITS transfers done manually seem to work without issue.

InvalidOperation:
Line |
5 | [Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[] .
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Unable to find type [Microsoft.BackgroundIntelligentTransfer.Management.BitsJob].

PS C:\temp> Save-KbUpdate -Name KB4057119 -Verbose
VERBOSE: [15:20:03][Save-KbUpdate] Processing default parameter set
VERBOSE: [15:20:03][Save-KbUpdate] Source set to Database
VERBOSE: [15:20:03][Get-KbUpdate] Source set to Database
VERBOSE: [15:20:03][Get-KbItemFromDb] Processing KB4057119
VERBOSE: [15:20:03][Get-KbItemFromDb] Query: select *, NULL AS SupersededBy, NULL AS Supersedes, NULL AS Link from kb where UpdateId in (select UpdateId from kb
where UpdateId = 'kb4057119' or Title like '%kb4057119%' or Id like '%kb4057119%' or Description like '%kb4057119%' or MSRCNumber like '%kb4057119%')
VERBOSE: [15:20:04][Get-KbItemFromDb] Found 1 in the database for kb4057119
VERBOSE: [15:20:04][Save-KbUpdate] Adding sqlserver2016-kb4057119-x64_c6f298b1e0d79c208f59590354823ebefffdae60.exe to download queue
VERBOSE: [15:20:04][Save-KbUpdate] Starting job process
InvalidOperation:
Line |
5 | [Microsoft.BackgroundIntelligentTransfer.Management.BitsJob[] .
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Unable to find type [Microsoft.BackgroundIntelligentTransfer.Management.BitsJob].
PS C:\temp> get-bitstransfer

JobId DisplayName TransferType JobState OwnerAccount


4f8d7088-058a-4213-a5e9-fd83fb3618f3 BITS Transfer Download Transferring WIN-

PS C:\temp> $error[0] | select *

PSMessageDetails :
Exception : System.Management.Automation.RuntimeException: Unable to find type [Microsoft.BackgroundIntelligentTransfer.Management.BitsJob].
at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
at System.Management.Automation.Language.Compiler.GetAttribute(TypeConstraintAst typeConstraintAst)
at System.Management.Automation.Language.Compiler.GetRuntimeDefinedParameter(ParameterAst parameterAst, Boolean&
customParameterSet, Boolean& usesCmdletBinding)
at System.Management.Automation.Language.Compiler.GetParameterMetaData(ReadOnlyCollection1 parameters, Boolean automaticPositions, Boolean& usesCmdletBinding) at System.Management.Automation.CompiledScriptBlockData.InitializeMetadata() at System.Management.Automation.CompiledScriptBlockData.Compile(Boolean optimized) at System.Management.Automation.PSScriptCmdlet..ctor(ScriptBlock scriptBlock, Boolean useNewScope, Boolean fromScriptFile, ExecutionContext context) at System.Management.Automation.CommandProcessor.Init(IScriptCommandInfo scriptCommandInfo) at System.Management.Automation.CommandDiscovery.GetScriptAsCmdletProcessor(IScriptCommandInfo scriptCommandInfo, ExecutionContext context, Boolean useNewScope, Boolean fromScriptFile, SessionStateInternal sessionState) at System.Management.Automation.CommandDiscovery.CreateCommandProcessorForScript(FunctionInfo functionInfo, ExecutionContext context, Boolean useNewScope, SessionStateInternal sessionState) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(CommandInfo commandInfo, CommandOrigin commandOrigin, Nullable1 useLocalScope, SessionStateInternal sessionState)
at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements,
CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][]
pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject : Microsoft.BackgroundIntelligentTransfer.Management.BitsJob
CategoryInfo : InvalidOperation: (Microsoft.Backgroun..Management.BitsJob:TypeName) [], RuntimeException
FullyQualifiedErrorId : TypeNotFound
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Save-KbUpdate, : line 311
at , : line 1
PipelineIterationInfo : {}

PS C:\temp>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions