Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell 2.0 compatibility #38

Open
madhavpatel6 opened this issue Aug 15, 2018 · 3 comments
Open

Powershell 2.0 compatibility #38

madhavpatel6 opened this issue Aug 15, 2018 · 3 comments

Comments

@madhavpatel6
Copy link
Contributor

Issue by rattuscz
Monday May 28, 2018 at 16:51 GMT
Originally opened as microsoft/adfsLogTools#20


Initial try to bring script to PS 2.0 compatible version - as our ADFS 2.0 are also PS2.0 😢

Analytics part still does not work - ConvertFrom-Json not in ps2

Not sure if this PS2.0 compatibility is even desirable in main branch, maybe as a separate?
Anyway looking for feedback


rattuscz included the following code: https://github.com/Microsoft/adfsLogTools/pull/20/commits

@madhavpatel6
Copy link
Contributor Author

Comment by msftclas
Monday May 28, 2018 at 16:51 GMT


CLA assistant check
All CLA requirements met.

@madhavpatel6
Copy link
Contributor Author

Comment by bongiovimatthew-microsoft
Tuesday May 29, 2018 at 20:23 GMT


@rattuscz, this looks like a fantastic start on the PS 2.0 compat. To handle the lack of ConvertFrom-Json, you might have to construct PowerShell objects to correspond to the template that we use.

I also think you have a good point about the PS 2.0 compat code not making sense in the master branch. One downside to having a dedicated sub-branch is that it will have to be periodically updated with the latest changes going into master. It might make sense for you to maintain a forked project, which we can call out in the documentation on our project. That would mean you would be the owner, and could manage the merging of any updates.

@madhavpatel6
Copy link
Contributor Author

Comment by rattuscz
Tuesday May 29, 2018 at 20:54 GMT


@bongiovimatthew-microsoft I'm right in the middle of switching places inside company so in one-two months I probably won't even have access to any servers with ADFS to test it on. That would probably make me a very poor owner 🙁

I will be happy to finish with replacing the json templates and any other problem I find to finish this PR as working PS2 version.

Also the line foreach ( $Event in $Result | Where { $null -ne $_ } ) - I'm not sure this is PS2 only problem, as $Result is @() + Get-WinEvent call that can lead to @() + $null which is array with null inside -> causes errors inside the foreach loop when not checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants