Tuesday, June 19, 2018

VMware find VM by mac address

Get-VM | Get-NetworkAdapter | Where {$_.MacAddress -eq "00:50:51:b7:54:a1"} | select parent,macaddress

Monday, June 11, 2018

IIS URL redirect error

When you are using iis to redirect  proxy IIS Return 404.4 Not Found when URL Rewrite on some pages , but page exists.

Open IIS rewrite web.config  file  and add inside the <system.webServer> tag, add the following:

<security>
<requestFiltering allowDoubleEscaping="true" />
</security>

Thursday, June 7, 2018

Change Sip addresses user powershell

Change old sip address to new to all users. Open skype for business powershell  and run :

$x = Get-CsUser | Where-Object {$_.SipAddress -like "*@oldSIP"}

 foreach ($i in $x)

    {
        $oldAddress = $i.SipAddress

        $newAddress = $oldAddress -replace "@oldSIP", "@newSIP"

        Set-CsUser -Identity $i.Identity -SipAddress $newAddress
    }