Giter Club home page Giter Club logo

get-log4j-windows.ps1's People

Contributors

keysau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

get-log4j-windows.ps1's Issues

Hosts Returning "Error, Script Failed" for Older Log4J Results - Use MANIFEST.MF instead of pom.properties

Thanks for making this script publicly available.
Had some trouble with some hosts returning "Error, Script Failed". After having a look through the remnant temp files and the script, I found that these hosts only had really old versions of Log4J that don't ship with pom.properties. I converted this section of code to search for MANIFEST.MF instead and pull out version info from Implementation-Version, swapped groupId for Implementation-Title and set artifactId to "N/A".

WARNING: Valid values for attribute 'SamAccountName' should end with '$'; the filter clause '(SamAccountName -like )' may not work as intended.

Thx for the script! The Windows-local version works great!
Having a bit trouble to get this one working.

I get following output.

PS C:\Windows\system32> C:\support\Get-log4j-Windows.ps1
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
PreReq: Powershell 5.0+. Proceeding..
PreReq: 7-zip tools installed. Proceeding..
PreReq: Credentials Detected. Proceeding..
WARNING: Valid values for attribute 'SamAccountName' should end with '$'; the filter clause '(SamAccountName -like  )' may not work as intended.
Get-ADComputer : The search filter cannot be recognized
At C:\support\Get-log4j-Windows.ps1:88 char:12
+ $Servers = Get-ADComputer -Filter "SamAccountName -like '$($AdCompSea ...
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ADComputer], ADException
    + FullyQualifiedErrorId : ActiveDirectoryServer:8254,Microsoft.ActiveDirectory.Management.Commands.GetADComputer
 
0.) Ping AD servers to make sure online..
Test-Connection : Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At C:\support\Get-log4j-Windows.ps1:120 char:63
+ ...  IF (Test-Connection -BufferSize 32 -Count 1 -ComputerName $_ -Quiet) ...
+                                                                ~~
    + CategoryInfo          : InvalidData: (:) [Test-Connection], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand
 
1.) Complete.
2.) Splitting 0 AD servers into blocks of 1 Servers each..
3.) Complete.
4.) Multi-thread Searching blocks of servers..
5.) Complete.
6.) Building Report Object..
7.) Complete.
8.) --All Complete--
9.) ------------------

I changed
$Domain = (Get-WmiObject Win32_ComputerSystem).Domain
to
$Domain = (Get-WmiObject Win32_ComputerSystem).mydomain.com

I don't need the multi domain switches. So it's not really clear if I need to change these values.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.