Get-WUHistory

%3CLINGO-SUB%20id%3D%22lingo-sub-1358867%22%20slang%3D%22en-US%22%3EGet-WUHistory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1358867%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20this%20project%20to%20get%20the%20list%20of%20Windows%20Updates%20whether%20from%20a%20server%20or%20workstation%20and%20so%20I%20used%20the%20cmdlet%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-WUHistory%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20does%20show%20the%20update%2C%20description%2C%20date%2Ftime%20it%20was%20installed.%20Now%20I%20know%20it%20would%20be%20easier%20to%20generate%20the%20results%20and%20save%20it%20in%20a%20notepad%20but%20my%20boss%20wanted%20me%20to%20send%20the%20results%20to%20our%20internal%20website%2C%20so%20I%20though%20of%20using%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInvoke-WebRequest%20-Uri%20%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2F%3CDOMAIN%3E%3C%2FDOMAIN%3E%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20I'm%20getting%20a%20Bad%20Request%20(400)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAm%20I%20missing%20something%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ETECH-JEFF%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1358867%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1362107%22%20slang%3D%22en-US%22%3ERe%3A%20Get-WUHistory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362107%22%20slang%3D%22en-US%22%3Eself%20speaking%20400%20is%20a%20'Bad%20Request'%2C%20the%20web-server%20can%20understand%20it%20or%20it%20is%20somehow%20badly%20formed%2Fcorrupted.%20Going%20by%20basic%20bottom-up%20elimination%20testing%2C%20can%20you%20successfully%20render%20it%20in%20a%20browser%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2086300%22%20slang%3D%22en-US%22%3ERe%3A%20Get-WUHistory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2086300%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241399%22%20target%3D%22_blank%22%3E%40Animesh%20Joshi%3C%2FA%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-22%20110920.png%22%20style%3D%22width%3A%20573px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248512i48D819F6D4548A2E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-22%20110920.png%22%20alt%3D%22Screenshot%202021-01-22%20110920.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ECan%20be%20%22UseDefaultCredentials%22%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

I have this project to get the list of Windows Updates whether from a server or workstation and so I used the cmdlet

 

Get-WUHistory

 

It does show the update, description, date/time it was installed. Now I know it would be easier to generate the results and save it in a notepad but my boss wanted me to send the results to our internal website, so I though of using 

 

Invoke-WebRequest -Uri https://<domain>

 

but I'm getting a Bad Request (400)

 

Am I missing something?

 

Thanks

TECH-JEFF

2 Replies
self speaking 400 is a 'Bad Request', the web-server can understand it or it is somehow badly formed/corrupted. Going by basic bottom-up elimination testing, can you successfully render it in a browser?

@Animesh Joshi Screenshot 2021-01-22 110920.png

Can be "UseDefaultCredentials" ?