microsoft / CSS-Exchange

Exchange Server support tools and scripts
MIT License
1.22k stars 340 forks source link

ExchangeMitigations.ps1[Issue] #227

Closed thankappas closed 3 years ago

thankappas commented 3 years ago

I tried to execute the script from a Powershell (run as administrator). : .\ExchangeMitigations.ps1 -WebSiteNames "Default Web Site" -ApplyAllMitigations -Verbose I already installed the URL rewrite 2.0 (for IIS 8.5) before running this.

I am receiving the following error:

Get-InstalledSoftware : Error: Cannot process argument because the value of argument "name" is not valid. Change the value of the "name" argument and run the operation again. - Line Number: 255 At C:\temp\ExchangeMitigations.ps1:299 char:26 $RewriteModule = Get-InstalledSoftware | Where-Object { $_.Na ...


     CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
     FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-InstalledSoftware

Environment:
 Exchange server 2013 CU13 on Windows 2012R2 (Powershell Version 5.1)
mabdo01552 commented 3 years ago

I am facing the same issue.

mabdo01552 commented 3 years ago

can anybody help us resolve this problem?

erinIs1337 commented 3 years ago

Looking into this now

erinIs1337 commented 3 years ago

@mabdo01552 are you also running Exchange server 2013 CU13 on Windows 2012R2 (Powershell Version 5.1)

mabdo01552 commented 3 years ago

exchange 2013 Version 15.0 (Build 1263.5) windows server 2012r2 Powershell version 4

Dannyvzon commented 3 years ago

Same here:

Exchange 2013 CU15 Windows 2012 Powershell 3.0

erinIs1337 commented 3 years ago

Found the issue, we tested this script on several older systems even the ones mentioned here on various versions of PowerShell and for some reason on these test machines the function was working fine without passing the -name param. Please let me know if this resolves this error on your systems.

mabdo01552 commented 3 years ago

Sorry, can not get how can i resolve the problem.

erinIs1337 commented 3 years ago

@mabdo01552 the fix is going through the build pipeline right now, once it's complete you will be to download the new script like before.

@bill-long - any eta on when the the next release will be out?

bill-long commented 3 years ago

@mabdo01552 @dbacon247 This released about 25 minutes ago. Can you download the latest release and confirm? Thank you.

Dannyvzon commented 3 years ago

Stil the same problem:

image

Edit: I checked the scripts, they look the same...

erinIs1337 commented 3 years ago

@Dannyvzon are you saying the new version you downloaded does not have this change?

image

bill-long commented 3 years ago

I sanity-checked the release file and that change is definitely there, though it's moved down to 335 due to the disclaimer:

image

However, 299, which is 281 in the source, still has the old syntax:

image

bill-long commented 3 years ago

We're talking about ExchangeMitigations.ps1, right? I didn't look at the old script. But that line 299 does match up with the error from @Dannyvzon 's screenshot.

erinIs1337 commented 3 years ago

@Dannyvzon Nvm I see I missed one on line 257, just submitted PR with this change

Dannyvzon commented 3 years ago

@dbacon247 No problm mate! let me know when i can download again :)

Dannyvzon commented 3 years ago

@bill-long @dbacon247 Script is working!

Note: If you use the download link in the discription you still get the old ps1. Downloaded the whole Css-Echange-main zip and now i got the correct one with the changes

Nmap scanning not showing Vulnerabilities anymore

erinIs1337 commented 3 years ago

@Dannyvzon the link points to the latest release, looks like it was updated 26 minutes ago. I just downloaded the latest version and it has the new changes in it. Should be good to go now.

mabdo01552 commented 3 years ago

The script is working with me now .

Thanks,

erinIs1337 commented 3 years ago

The script is working with me now .

Thanks,

Great!

erinIs1337 commented 3 years ago

@thankappas - looks like the script is working now for those who were running into this issue, can you confirm?

thankappas commented 3 years ago

@thankappas - looks like the script is working now for those who were running into this issue, can you confirm?

Yes i confirm it works! Thank you