Friday, November 16, 2018

Logon script to restart computers from list

for /F "tokens=*" %%x in ('type c:\tmp\restart.txt') do ( shutdown.exe -m "%%x" -t 0 -r -f )
pause


in txt file write computer fqdn names 

Change Mozilla Firefox home page GPO


On old versions  Mozilla ADMX does not work properly
to change home page use this bat script (create log on script policy)

---------------

echo off
cd /D "%APPDATA%\Mozilla\Firefox\Profiles"
cd *.default
set ffile=%cd%
echo %user_pref("browser.startup.homepage", );% del /f /q "%ffile%\prefs.js"
echo user_pref("browser.startup.homepage", "http://int.psh.gov.ge");>>"%ffile%\prefs.js"
set ffile=
cd %windir%

------------------


If your mozilla version is higher, than 60 version, you can you ADMX templates (Create computer base policy)

you can download here :

https://github.com/mozilla/policy-templates/releases



Monday, September 3, 2018

Disable IPv6 GPO

Add the preference will be Computer Configuration > Preferences > Windows Settings > Registry. In there, you want to add a new Registry Item, with the below settings on the General tab:

  • Action: Update
  • Hive: HKEY_LOCAL_MACHINE
  • Key Path: SYSTEM\CurrentControlSet\services\TCPIP6\Parameters
  • Value Name: DisabledComponents
  • Value Type: REG_DWORD
  • Value Data: FF
  • Base: Hexadecimal

Thursday, July 5, 2018

Extend Volume failed, but partition was extended

If you extended disk but space doesnot added to partition

Open CMD as administrator:

  1. diskpart
  2. list volume
  3. select volume x
  4. extend filesystem

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
    }