2017년 1월 12일 목요일

Installing Workflow Manageer offline for SharePoint 2013

Many times when working on a clients servers they are not allowed outbound access to the internet and the client may not have the latest versions of prerequisites available.  There are several blogs that indicate how to install offline versions of these prerequisites, but I encountered an error recently when trying to grab Workflow Manager for SharePoint 2013.

“Can’t find product with id WorkflowManger.”

Install the command line installer from here http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release




So if you use the command
WebpiCMd.exe /Offline /Products:WorkflowManager /Path:”Your Path Here” you get the error that it can’t find Workflow Manager.





Instead use WebpiCMd.exe /Offline /Products:WorkflowManagerRefresh /Path:”Your Path Here”
This is because WorkflowManager was changed to WorkflowManagerRefresh as of Jan 2014.  UPDATE When writing this blog I found that there is a new MSDN blog that addresses the issue
http://blogs.msdn.com/b/chaun/archive/2014/03/27/webpicmd-offline-products-workflowmanager-versus-products-workflowmanagerrefresh.aspx

2017년 1월 11일 수요일

AD User Import & Export


Export User Profiles

Import-Module ActiveDirectory
Get-ADUser -Filter {enabled -eq $true} -Properties Name, SamAccountName, UserPrincipalName, EmailAddress, Company `
    , DisplayName, Fax, HomeDirectory, HomeDrive, HomePage, HomePhone, Initials, Office, OfficePhone, Department, Description `
    , ScriptPath, City, State, StreetAddress, Title, Manager `
    | ? {$_.DistinguishedName -like "*,OU=XXXX,*"} | Export-csv -path D:\deploy\UserProfiles.csv -NoTypeInformation

2017년 1월 9일 월요일

SharePoint 2013 Offline Installation

This is my first in a series of blog posts explaining various ways to present System Center Operations Manager dashboards.  SharePoint is not required to publish dashboards; however, as the series continues this will be a key contribution when we do begin integrating dashboards into SharePoint.  This post will not cover the full installation of SharePoint, only setting up your SharePoint servers for offline install of SharePoint 2013 SP1 on Windows Server 2012 R2 Operating System.
Craig Lussier created a very comprehensive Wiki article on this for SharePoint 2013 RTM.  I am merely adding some things that helped me along the way in addition to performing the install with SharePoint 2013 SP1 on Server 2012 R2.  Also, the focus of this blog will be offline installs and configurations.
The first thing to do is copy the SharePoint 2013 SP1 binaries over to the server you plan on installing SharePoint on.  For this blog I will use E:\SharePoint2013SP1Install\ as the root folder and will only use one server for all SharePoint roles later in the series.  You will need to perform the prerequisite installs on any servers you plan on installing SharePoint 2013 SP1 on.
If you try to run Setup.exe with no prerequisites installed you will receive this error:

This will place the necessary Windows Server 2012 R2 Server Manager prerequisites into an InstallPending status.  You can verify this (Before rebooting) by using the PowerShell command: Get-WindowsFeatures and reviewing the list of features with a status of InstallPending.  Once rebooted the features will show an Installed status.
Alternatively you can use the following PowerShell script with the Windows Server 2012 R2 installation media to install the necessary features:
Import-Module ServerManager
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer –Source D:\sources\sxs
Now if you try to run Setup.exe you will receive the following error:

Notice that the Server Manager Prerequisites are no longer listed.
As with SharePoint 2013 RTM there are several prerequisite installs with specific versions that must be installed prior to installing SharePoint.  There really is only one additional application to install for SP1, WcfServices version 5.6.  I recommend renaming at download so the WcfDataServices.exe 5.0 file does not get overwritten when placed into the same directory.  I save these files and copy them to the directory where we stored the SharePoint binaries E:\SharePoint2013SP1Install\PreRequisiteInstallerFiles\

The list of files to download are as follows:
SQL Server 2008 R2 SP1 Native Client:http://download.microsoft.com/download/9/1/3/9138773A-505D-43E2-AC08-9A77E1E0490B/1033/x64/sqlncli.msi

Microsoft WCF Data Services 5.0:
http://download.microsoft.com/download/8/F/9/8F93DBBD-896B-4760-AC81-646F61363A6D/WcfDataServices.exe

Microsoft WCF Data Services 5.6 (rename this download to WcfDataServices56.exe):
http://download.microsoft.com/download/1/C/A/1CAA41C7-88B9-42D6-9E11-3C655656DAB1/WcfDataServices.exe

Microsoft Information Protection and Control Client (MSIPC):
http://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi

Microsoft Sync Framework Runtime v1.0 SP1 (x64):
http://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi

Windows Identity Extensions:
http://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/r2/MicrosoftIdentityExtensions-64.msi

Windows Identity Foundation (KB974405):
http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu

Windows Server AppFabric:
http://download.microsoft.com/download/A/6/7/A678AB47-496B-4907-B3D4-0A2D280A13C0/WindowsServerAppFabricSetup_x64.exe

CU 1 for AppFabric 1.1 (KB2671763):
http://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe
Once you download the files and save them to the isolated network server you can run the following PowerShell script as Administrator to install them:

(Be sure everything from Start-Process on is on the same line, do not copy and paste the entire code from here as I edited it for page formatting)

$SharePoint2013SP1Path = "E:\SharePoint2013SP1Install"
Start-Process "$SharePoint2013SP1Path\PrerequisiteInstaller.exe" –ArgumentList "/SQLNCli:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\sqlncli.msi /IDFX:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu
/IDFX11:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\MicrosoftIdentityExtensions-64.msi
/Sync:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\Synchronization.msi
/AppFabric:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\ WindowsServerAppFabricSetup_x64.exe /KB2671763:$SharePoint2013SP1Path\ PrerequisiteInstallerFiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe
/MSIPCClient:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\setup_msipc_x64.msi
/WCFDataServices:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\WcfDataServices.exe
/WCFDataServices56:$SharePoint2013SP1Path\PrerequisiteInstallerFiles\WcfDataServices56.exe"
 

Once you execute the PowerShell script the Products Preparation Tool will open:

This lists the applications that will be installed if not installed already.

Follow the wizard to continue installing the prerequisites.
Once completed you will be prompt to reboot:

Once you select finish and the system reboots it may require additional installations.
You will receive an Installation Complete notice when completed:

You are ready to install SharePoint 2013 SP1 on Windows Server 2012 R2.
You are now able to run Setup.exe from the SharePoint install files directory as an Administrator with database permissions.
Enter your product key to continue with the installation:

2017년 1월 5일 목요일

Open with Explorer 기능 제한주기


Open with Explorer(윈도우 탐색 열기) 기능에 대해 제한을 주기 위한 방법입니다.


SharePoint 2013기준으로 아래 경로에 가서
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\DefaultTemplates.ascx

파일을 Open해서 "OpenInExplorer"로 검색하여 PermissionsString 값을 아래와 같이 변경합니다

2012년 4월 5일 목요일

InfoPath에서 윈도우 상단에 'X' 버튼 비활성화

이번 포스트는
아래 그림과 같이 InfoPath 양식을 강제로 종료하지 못하게 하는방법에 대한 설명입니다.



FormCode.cs 에 아래 소스를 추가합니다.
  

   #region 'X' 버튼 비활성화
       
        private const int SC_CLOSE = 61536;
        private const int MF_BYCOMMAND = 0;
        private const int MF_GRAYED = 1;
        private const int MF_ENABLED = 0;
        // Récupère le handle d'une fenêtre à partir de son titre
        [DllImport("user32.dll", EntryPoint = "FindWindowA")]
        private static extern int FindWindow(string lpClassName, string lpWindowName);
        // Fonctions de gestions des menus systèmes windows
        [DllImport("user32.dll")]
        private static extern int GetSystemMenu(int hwnd, int revert);
        [DllImport("user32.dll")]
        private static extern int EnableMenuItem(int menu, int ideEnableItem, int enable);
        public static void Disable(int handle)
        {
            switch (EnableMenuItem(GetSystemMenu(handle, 0), SC_CLOSE, (MF_BYCOMMAND | MF_GRAYED)))
            {
                case MF_ENABLED:
                    break;
                case MF_GRAYED:
                    break;
                default:
                    break;
            }
        }
        #endregion

Form_Loading 메소드에 아래 소스를 추가합니다.
 int myWindow;                   
 myWindow = FindWindow(null, this.Application.Name);                   
 Disable(myWindow);


참조 : http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/257f186f-3ab3-4ac4-9553-f71d100ad297

2011년 4월 24일 일요일

[SharePoint 장애]데이터시트 보기

SharePoint 2010에서 목록의 보기 서식에서 [데이터시트 보기]라는 기능이 있는데, 선택을 하면 아래와 같은 에러가 발생합니다.

원인은, 사용자 컴퓨터의 Office버전이 64bit버전은 32bit Active-X 컨트롤을 함께 제공하지 않는 것에 있습니다.
출처 = http://www.knowsharepoint.com/2010/06/sharepoint-datasheet-view-and-office.html
그래서 아래 사이트에 접속해서 [데이터 연결 구성요소] 컴포넌트를 다운받아, 해당 사용자 PC(64bit)에 설치하면 됩니다.
http://www.microsoft.com/downloads/ko-kr/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891