Monday, May 30, 2016

В PowerShell параметры транспорта можно задать командлетом Set-TransportConfig:

1. Получаем текущие значения:

Get-TransportConfig | fl *size*

2. Изменяем максимальный размер отправляемых сообщений:

Set-TransportConfig –MaxSendSize 20Mb

Tuesday, May 24, 2016

Get Windows and Office version on remote computers




for /F "tokens=*" %x in ('type c:\tmp\pc.txt') do cscript /nologo C:\tmp\office_versions.vbs "%x">>C:\tmp\os_office.txt 


Wednesday, May 18, 2016

Sharepoint 2013 Gallery SlideShow

http://www.getinthesky.com/2014/04/sharepoint-image-gallery-doesnt-suck/

Friday, May 13, 2016

Sharepoint Visio WebPart Hyperlink disable Press CTRL

1. Place a ScriptEditor webpart on the same page that has the Visio webpart
2. Paste the following code into the webpart:

<script type="text/javascript">
// Declare global variables.
var vwaControl;
var vwaPage;
var vwaShapes;
var currentShape;

Sys.Application.add_load(onApplicationLoad)

// Search the SharePoint page to get the WebPartID# for the Visio Web Access Web Part.
function getVWAWebPartID()
{
    // Get a NodesList of all the div tags on the page.
    var divArray = document.getElementsByTagName("div");
    var webPartElementID;
    // Iterate through the NodesList to get the node with the class attribute "VisioWebAccess."
    for (var i = 0; i < divArray.length; i++) {
        var node = divArray[i];
        // Return the first instance of the Visio Web Access Web Part.
        if (node.className == "VisioWebAccess") {
            webPartElementID = node.parentNode.parentNode.id;
            break;
        }
    }
    return webPartElementID;
}

//Apply the handlers in the "OnLoad" event, for we need this each time we click a Shape
function onApplicationLoad()
{
        vwaControl= new Vwa.VwaControl(getVWAWebPartID());
        vwaControl.addHandler("diagramcomplete", onDiagramComplete);
        vwaControl.addHandler("shapeselectionchanged", ClickIt);
        vwaControl.addHandler("shapemouseenter", getShape);
        vwaControl.addHandler("shapemouseleave", unselectShape);
}

//This is the "MouseEnter" event that fires when you enter/hover a Shape
getShape = function (source, args)
{
   currentShape=null;
   currentShape=vwaShapes.getItemById(args) ;
}

//This is the "MouseLeave" event that fires when the mousecursor leaves/unselects the shape
unselectShape = function (source, args)
{
currentShape=null ;
}

//The event that fires when a diagram is loaded
function onDiagramComplete() {
        try {
            vwaPage = vwaControl.getActivePage();           
            vwaShapes = vwaPage.getShapes();  
            currentShape=null;                                         
        }
        catch (err) {
            //alert(err);
        }
}

//The function that enables the single click!
function ClickIt()
{
 if (currentShape != null)
 {
 var drawingURL = vwaControl.getDiagramUrl();
  while(drawingURL.indexOf('%20')>0)
  {
  drawingURL=drawingURL.replace('%20',' ');
  }
 vwaPage = vwaControl.getActivePage();
 var vwaPageName = vwaPage.getId();
 var n=currentShape.getHyperlinks();
  if (n.length>0 )
  {
  vwaPages = vwaControl.getAllPageIds();
  var pageCount = vwaPages.length;
   // Get page ID from array of pages IDs.
   for (var i = 0; i < pageCount; i++)
   {
   vwaPageId = vwaPages[i];
   //Set variable PageName to the URL of the Shape
   vwaPageName=n[0].value;
    //Clean up the URL
    while(vwaPageName.indexOf('%20')>0)
    {
    vwaPageName=vwaPageName.replace('%20',' ');
    }
    //If the PageID exists in the PageName (URL of the Shape)
    if (vwaPageName.indexOf(vwaPages[i])>0)
    {
    //HERE IT IS!! OPEN THE SHAPE WITH A SINGLE CLICK!!!
    //By using "OpenDiagram" instead of "setActivePage" the Shape gets deselected after the click!
    vwaControl.openDiagram(drawingURL, i);
    //Call "onApplicationLoad" to set the handlers again for the 'new' Diagram
    onApplicationLoad();                                                                      
    break;
    }
   }  
  }
 }
}
</script>

Wednesday, April 20, 2016

Exchange 2010 Prerequisites on Server 2008 R2

  • Open powershell and run the following command
    • Import-Module ServerManager
  • For a server that will have the typical installation of Client Access, Hub Transport, and theMailbox roles:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Web-WMI -Restart
  • For a server that will host the Client Access and Hub Transport server roles:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Web-WMI -Restart
  • For a server that will host only the Mailbox role:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart
  • For a server that will host only the Unified Messaging role:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -Restart
  • For a server that will host the Edge Transport role:
    • Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart
  • After the system has restarted, configure the Net.Tcp Port Sharing Service for Automatic startup by running the following command:
    • Set-Service NetTcpPortSharing -StartupType Automatic

Upgrade Windows Server 2008 R2 From Standart to Enterprise

View Current installed Version
DISM /online /Get-CurrentEdition

View versions available for upgrade
DISM /online /Get-TargetEditions

for upgrade 
DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

DISM /online /Set-Edition:ServerEnterprise /ProductKey:489J6-VHDMP-X63PK-3K798-CPX3Y

Restart Computer

Saturday, April 9, 2016

Internet Explorer cannot display the webpage when creating new Web Application in SharePoint 2013

When creating a new Web Application in SharePoint 2013 you might get this message in the “pop up” window: Internet Explorer cannot display the webpage like in the following ScreenShot:






 By Default, the application pool only allows for 90 seconds for all the connections to close before it down by force. If you got this message it’s because 90 seconds wasn’t enough and we need to increase that limit.


Solution :

In IIS click Application Pools--- SharePoint Central Administration v4 application pool. Right click on it and choose Advanced Settings




In the Process Model section, set the Shutdown Time Limit to a greater value. As an example, 300.




Restart IIS.


Source