[Forum FAQ] Introduce Windows Powershell Remoting

This article will introduce three methods of Windows Powershell Remoting:
Method 1: WMI
Remoting Cmdlet: Get-WMIObject
Protocols: WMI/RPC/DCOM
Port: Random port
Data Encryption: Clear text
Note: No need of the WinRM’s installation and configuration
Method 2: PowerShell Remoting Commands
Remoting Cmdlet: Invoke-Command
Protocols: HTTP (wsman), MIME, SOAP, XML
Port: 5985
Data Encryption: Encrypted
Note: Support any cmdlets in the parameter scriptblock, however, need the computer install WinRM, and also need to configure the WinRM on the remote computer.
Method 3: PowerShell Remoting Interactively
Remoting Cmdlet: Enter-PSSession
Protocols: HTTP (wsman), MIME, SOAP, XML
Port: 5985
Data Encryption: Encrypted
Note: Support any cmdlets, all cmdlets you type are executed as if they were typed on the console of the remote computer. However, need the computer install WinRM, and also need
to configure the WinRM on the remote computer.

2. Powershell remote in the same domain with WinRM installed:  Invoke-Command, Enter-PSSession
2.1 PowerShell Remoting Commands: Invoke-Command
If you only have a couple of commands to execute on the remote computer in the same domain, you can use the
Invoke-Command cmdlet.
For example: Server1 want to remote manage Server2
1) Enable powershell remoting on Server2
Launch Windows Powershell as “Run as Administrator” on server2, and run:
Enable-PSRemoting –Force
Note:  
In Server 2012 (but not Windows 8), PowerShell remoting is enabled by default, so you don't need to do anything.
2) Run invoke-command on server1
Invoke-Command -ComputerName server2 -Credential domain\username -ScriptBlock {get-process}
If the user account run with Powershell has the admin permission, there is no need to specify the credential parameter.
The script above will run the cmdlet “get-process” on server2, and a temporary connection will be built, the result returned to server1, and the connection broken.
If you want to run powershell script .ps1 file on server2, however, this script is stored on server1, you can achieve as below:
Invoke-Command -ComputerName server2 -Credential domain\username -FilePath d:\1.ps1
2.2 PowerShell Remoting Interactively: Enter-PSSession
To work interactively, use
Enter-PSSession to connect to a remote session, all the cmdlets you typed in your local console is executed on the remote system until you leave the remote session by using
Exit-PSSession.
After configure the WinRM on server2, you can run
enter-pssession on server1 (Figure 3):
Figure 3:  remote with enter-pssession
2.3 Powershell remote with Pssession:  New-Pssession
Whenever you use Windows PowerShell Remoting with the ComputerName parameter, a temporary session is created for you and used only for this particular command. Once the command
completes, the session is automatically closed.
If you start to access remote systems more often or would like to keep the session state, a more efficient way is to create sessions yourself and keep them around until you no longer
need them. To achieve this, instead of specifying the parameter computername, you can also specify Pssession in the Session parameter of the cmdlets
invoke-command and enter-pssession (Figure 4).
Figure 4:  persistent session
If there is no need to use the Pssession, you can use the cmdlet
Remove-PSSession to close the session.

Similar Messages

  • [Forum FAQ] "Unable to connect to the server by using Windows PowerShell Remoting" error while installing RDS roles on Server 2012 R2

    When you try to install RDS role on server 2012 R2 using standard deployment, this issue may occur (Figure 1).
    “Unable to connect to the server by using Windows PowerShell remoting”.
    Figure 1: Unable to connect to the server by using Windows PowerShell remoting
    First of all, we need to verify the configurations as it suggested:
    1. The server must be available by using Windows PowerShell remotely.
    2. The server must be joined to a domain.
    3. The server must be running at least Windows Server 2012 R2.
    4. The currently logged on user must be a member of the local Administrators group on the server.
    5. Remote Desktop Services connections must be enabled by using Group Policy.
    In addition, we need to check if the “Windows Remote Management “service is running and related firewall exceptions have been created for WinRM listener.
    To enabling PowerShell remoting, we can run this PowerShell command as administrator (Figure 2).
    Enable-PSRemoting -Force
    Figure 2: Enable PowerShell Remoting
    However, if issue persists, we need to check whether it has enough memory to work.
    By default, remote shell allots only 150 MB of memory. If we have IIS or SharePoint App pool, 150 MB of memory is not sufficient to perform the remoting task. Therefore, we need to increase
    the memory via the PowerShell command below:
    Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000
    Then, you need to restart the server and the issue should be resolved.
    You can get more information regarding Remote Troubleshooting by below link:
    about_Remote_Troubleshooting
    If you need further assistance, welcome to post your questions in the
    RDS forum.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    i found another possible reason, this solution worked for me:
    http://oyvindnilsen.com/solution-for-powershell-remoting-error-it-cannot-determine-the-content-type-of-the-http-response-from-the-destination-computer/
    I tried to set up powershell remoting on a server and kept getting this error:
    Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cann
    ot process the request. It cannot determine the content type of the HTTP response from the destination comput
    er. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help to
    pic.
    After a bit of troubleshooting I discovered that the problem was that the authentication packets was to big (over 16k), this will cause WinRM to reject the request. The reason for authentication packets getting too big can be because the user is member of very
    many security groups or in my case because of the SidHistory attribute.
    The solution was to increase the MaxFieldLength and MaxRequestBytes keys in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
    If the keys does not exists you can create them, be sure to use the DWORD type.
    I sat MaxFieldLength to DEC value 40000 and MaxRequestBytes to DEC value 32768 and rebooted the server. Problem solved.

  • [Forum FAQ] Introduce the Windows Essentials Connector software and checklist for its configuration issues

    Introduction
    The Connector software for the Windows Server Essentials OS connects the computers in your network to the Windows Server Essentials server. When you connect computers to the server via Connector
    software, it will help you to automatically back up the computers and monitor their health. Meanwhile, you will be able to configure and remotely administer the Windows Server Essentials server. The Connector software is installed when you connect a client
    computer to the server. You can start by typing http://<your_server_name>/connect
    Example: Windows 8.1 connects to Windows Server 2012 R2 Essentials
    1. Open the Dashboard on Windows Server 2012 Essentials, navigate to USERS tab. Right click and select Add a user account (Figure 1). Then follow the Add a User Account wizard to configure
    and add the user account (Figure 2).
    Figure 1: Add a user account -1
    Figure 2: Add a user account -2
    2. Logon the client computer, type the http://<your_server_name>/connect in IE. Then you will see the download page for Connector software (Figure 3).
    Figure 3:Download the
    Connector software
    3. Click Download software for Windows and download the Connect software (ComputerConnector), then run it.
    After restart automatically, please follow the Windows Server Essentials Connector Configuration Wizard (Figure 4 – Figure 7).
    Figure 4: Windows Server Essentials Connector Configuration Wizard -1
    Figure 5: Windows Server Essentials Connector Configuration Wizard -2
    Figure 6: Windows Server Essentials Connector Configuration Wizard -3
    Figure 7: Windows Server Essentials Connector Configuration Wizard -4
    4. When complete the configuration wizard and logon the client computer, you will be able to use the Launchpad (Figure 8).
    Figure 8: Launchpad
    5. Meanwhile, when you open Dashboard, will be able to find that the Windows 8.1 is listed under DEVICES. It will help administrators to manage the client computer (Figure 9).
    Figure 9: Clients listed in the Devices panel
    For Windows XP
    You can type http://<your_server_name>/connect in IE. Then the download page will appear (Figure 10).
    Figure 10: Download page
    However, it will encounter the error: “xxx.exe is not a valid Win32 application” (Figure 11).
    Figure 11: Error message on Windows XP
    Windows XP is not a supported OS for client computer. For more details, please refer to
    Get Connected in Windows Server Essentials.
    In addition, please note:
    Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options.

    Checklist for the configuration issues
    First of all, when we want to connect the client computers to Windows Server Essentials, please check if the date and time settings for the client computer is consistent with the server.
    Meanwhile, please also check the Regional and Language settings.
    Issue 1: Installation did not succeed
    When accept the license terms to continue in the configuration wizard, you may encounter the error (Figure 12).
    Installation did not succeed
    Windows Server Essentials Connector has not been installed because:
    Cannot download the package.
    Verify that your device is connected to the Internet, and then install the Windows Server Essentials Connector.
    Figure 12: Installation did not succeed
    Checklist:
    1. Verify the DNS client settings.
    2. Check the communication between DNS server and the client.
    3. Check if you can ping server via IP address and server name successfully
    Issue 2: Cannot connect this computer to the network (Network related)
    This computer is already connected to another Windows Server network. Before connecting this computer to the Windows Server Essentials network, you must remove this computer from the
    current network.
    To resolve this issue, contact the person responsible for your network.
    Figure 13: Cannot connect this computer to the network (Network related)
    Checklist:
    1. Check if the client computer is a member of another server network.
    2. Change the client computer to Workgroup via administrator. Then check if you can connect it to the new Windows Server Essentials network.
    Issue 3:
    Cannot connect this computer to the network (Account related)
    The computer cannot be connected to the server using the user name and password credentials provided. This may be because an existing computer account having name “ComputerName” was previously
    created using a different set of credentials. Rename this computer and then try to connect this computer to the server again, or contact your administrator to remove any old conflicting account.
    When you connect the client computer to server essentials with a new user account, please check if the client computer has been connected to the server essentials, and didn’t remove from
    Dashboard. You may encounter the following error.
    Figure 14: Cannot connect this computer to the network (Account related)
    Checklist:
    1. Check if the client computer has been connected to the server essentials, and didn’t remove from Dashboard.
    2. Remove the client computer from the Dashboard, then try again.
    Additional resource:
    Troubleshoot connecting computers to the server in Windows Server Essentials
    Windows 2012 Server Essentials ConnectComputer
    Troubleshooting

  • [Forum FAQ] Introduce Backup in Windows Server 2012 R2 Essentials

    Windows Server 2012 R2 Essentials provides reliable ways to perform regular backups of your server and backups of your network computers.
    1. Server Backup
    Description:
    Backs up your server running Windows Server Essentials. The data is backed up to an external USB drive. You can also perform full system restore of server.
    Operations:
    On Dashboard, please select DEVICES and then navigate to the server which you need to backup. Right click the server and select Set up backup. When set up complete, you will be able to
    Start a backup for the server. (Figure 1)
    Figure 1
    More information:
    Manage server backup in Windows Server Essentials
    Restore or repair your server running Windows Server Essentials

    3. Microsoft Azure Backup
    Descriptions:
    Performs an online backup of files or folders on your server. When you use Azure Backup to back up server data, the information is encrypted by using your passphrase before it is uploaded to a secure datacenter on the Internet.
    Operations:
    1) Open Dashboard and follow the path: HOME-> Get Started-> ADD-INS-> Integrate with Windows Azure Backup. Then as Figure 3 shows, you need to “Click to sign up for Windows Azure Backup” and “Click to download Windows Azure
    Backup integration module”.
    Figure 3
    Please note: when you click to download, you may encounter the issue as Figure 4 shows. If so, please follow the path:
    Tools-> Internet Options-> Security->
    Trusted sites-> Add this website to the zone and add
    http://downlaod.microsoft.com,
    https://activedirectory.windowsazure.com in Trusted sites in IE. (Please uncheck
    Require server verification (https:) for all sites in this zone). Then please check if you can download as normal.
    Figure 4
    2) After you download the OnlineBackupAddin, please run it. Then begin to install the add-in. (if any issue occurs in your installation of add-in, please navigate to C:\PrgramData\Microsoft\Windows Server\Logs folder and check
    InstallAddin log file if you can find some clues.)
    3) During your installation, KB 2873390 may be required. Please download the update package and run it. Then Windows Azure Backup Agent Upgrade Wizard appeared. Please follow it and complete as Figure 5
    and Figure 6 show.
    Figure 5
    Figure 6
    4) Then please re-open Dashboard, you will find ONLINE BACKUP option. (Figure 7) There will be three steps that you need to do: (i)
    Upload a certificate. (ii) Register your server.
    (iii) Configure backup settings.
    Figure 7
    (i). Upload a certificate. (In this example, we use the second option: Upload certificate to Windows Azure Backup vault)
    Please logon Windows Azure, select RECOVERY SERVICES and click
    NEW. Follow the path: RECOVERY SERVICES-> BACKUP VAULT->
    QUICK CREATE. Please type NAME and select
    REGION, then click CREATE VAULT. When create completes, please click the name of this new recovery service that you create. As Figure 8 shows. Then select Manage Certificate to add or update the certificate file (.cer) that contains
    a public key for the vault. The certificate is used to register servers with the vault.
    Figure 8
    (ii). Register your server
    On Dashboard, navigate to Online Backup and click Register. (Figure 9)
    Figure 9
    Then it will check the certificate. And then you need to set a passphrase to secure your data. (Figure 10)
    Figure 10
    When you set passphrase complete, please click Next to continue. When register successfully. You will see Figure 11.
    Figure 11
    (iii). Configure backup settings
    When register completes, please click Configure Online Backup. Then you can follow the Configure Online Backup wizard to configure online backup (add folders), specify the backup schedule, specify the backup retention policy and choose bandwidth usage. The
    all process will be shown in Figure 12-16.
    Figure 12
    Figure 13
    Figure 14
    Figure 15
    Figure 16
    After all configurations complete, you will be able to see that the server integrates with Windows Azure Backup. (Figure 17)
    Figure 17
    On the Dashboard in server essentials, you will be able to start backup online. (Figure 18)
    Figure 18
    After backup online, you will see the protected data as Figure 19 and Figure 20 show in Dashboard and Windows Azure.
    Figure 19
    Figure 20
    More information:
    Manage Online Backup in Windows Server Essentials

  • [Forum FAQ] Introduce three common parameters of Logon Events

    There are lots of threads querying about logon events. In this article, we will introduce some simple but efficient ways to help us better understand user logon events.
    Logon Type
    Logon type is a concise parameter which can help us determine where and how logon events are triggered.
    Windows system has 13 logon types, each one is well documented in this article below:
    Win32_LogonSession class
    Please note that Interactive logon can be generated both locally and remotely through Terminal Services/Remote Desktop Services. Logon attempts through Terminal Services/Remote Desktop Services are logged as Remote Interactive logon, logon type is 10.
    We may confuse Network logon (logon type 3) with Remote Interactive logon.
    In fact, Network logon only provides network access to the destination computer while interactive logon enables users the ability of interacting with applications on the destination computer after they logged on.
    Another way to distinguish Interactive and Network logon is Interactive logon requires that users input credentials during the logon process, we can see Event ID 4648 “A logon was attempted using explicit credentials” (Figure 1) for every interactive logon,
    but Network logon doesn’t require explicit credentials.
    Figure 1: Event 4648
    This is by design to provide better user experience, so that we don’t need to input credentials repeatedly when accessing network resources after we logged on. In addition, this is also part of the reasons why there are always countless logon/logoff events
    in the event logs.
    Figure 2 and Figure 3 are Remote Interactive logon and Network logon event.
    Figure 2: Network Logon
    Figure 3: Remote Interactive Logon

    Logon GUID
    As we all know, GUID is an identifier which is unique within a whole system, Logon GUID is also a unique identifier for every logon session.
    We can use Logon GUID to determine which events belong to one logon session (Figure 6).
    Exceptions: local logons and domain logons using NTLM authentication mechanism have a number which contains 32 bits of 0 as logon GUID (Figure 7).
    Figure 6: Logon GUID of Kerberos Authentication
    Figure 7: Logon GUID of NTLM Authentication
    If you need further assistance about Logon Events, welcome to post questions in our
    Security forum. 
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • [Forum FAQ] How to install and configure Windows Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely

    As we all know,
    the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
    Essentials Experience role in Server Manager or via Windows PowerShell.
    In this article, we introduce the steps to install and configure Windows
    Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
    Before installing the Windows Server Essentials Experience Role, please use
    Get-WindowsFeature
    PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
    Figure 1.
    Part 1: Install Windows Server Essentials Experience role locally
    Add Windows Server Essentials Experience role
    Run Windows PowerShell as administrator, then type
    Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
    Figure 2.
    Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
    (Figure 3)
    Figure 3.
      2. Configure Windows Server Essentials Experience role
    (1)  In an existing domain environment
    Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
    Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
    Figure 4.
    After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
    Server Essentials:
    Start-WssConfigurationService –Credential <Your Credential>
    Note: The type of
    Your Credential should be as: Domain-Name\Domain-User-Account.
    You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
    Figure 5.
    Next, you can type the password for the domain account. (Figure 6)
    Figure 6.
    After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
    Figure 7.
    By the way, you can use
    Get-WssConfigurationStatus
    PowerShell cmdlet to
    get the status of the configuration of Windows Server Essentials. Specify the
    ShowProgress parameter to view a progress indicator. (Figure 8)
    Figure 8.
    (2) In a non-domain environment
    Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
    Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
    Figure 9.
    After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
    After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
    After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
    Figure 12.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Part 2: Install and configure Windows Server Essentials Experience role remotely
    In an existing domain environment
    In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
    Add-WindowsFeature -Name ServerEssentialsRole
    -ComputerName xxx -Credential DomainName\DomainAccount
    Figure 13.
    After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
    Figure 14.
    After the installation completes, it will return the result as below:
    Figure 15.
    Next, please use the
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
    Enter-PSSession –ComputerName
    xxx –Credential DomainName\DomainAccount (Figure 16)
    Figure 16.
    Then, please configure Server Essentials Role via
    Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
    Figure 17.
    After your credential is accepted, it will update and prepare your server. (Figure 18)
    Figure 18.
    After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
    Figure 19.
    2. In a non-domain environment
    In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
    below:
    Sevrer1: 192.168.1.54
    Server2: 192.168.1.53
    Run
    Enable-PSRemoting –Force on Server1. (Figure 20)
    Figure 20.
    Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
    to
    add the TrustedHosts entry:
    Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
    (Figure 21)
    Figure 21.
    Next, we can use
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
    Figure 22.
    After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
    Figure 23.
    From figure 24, we can see that the installation is completed.
    Figure 24.
    Then you can use
    Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
    The figure below shows the status of Windows Server Essentials.
    Figure
    25.
    Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
    Figure 26.
    More information:
    [Forum
    FAQ] Introduce Windows Powershell Remoting
    Windows Server Essentials Setup Cmdlets
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • Enabling PowerShell Remoting SSL on Windows 7

    Hello,
    We have been asked to setup PowerShell Remoting HTTPS on our Windows 7 estate.  I was just wondering if there is a step-by-step guide (which even includes certificates creation etc.)?
    HTTP option was rejected saying it's not secure. 
    Any help would be highly appreciated.
    Regards

    Hi,
    Here's a few general walkthroughs:
    http://blog.powershell.no/2010/03/04/enable-and-configure-windows-powershell-remoting-using-group-policy/
    http://www.briantist.com/how-to/powershell-remoting-group-policy/
    Here's one that's most likely more on target for what you're after:
    https://wprogramming.wordpress.com/2011/07/11/remote-pssession-over-ssl/
    It's unlikely that you'll find something that will hold your hand the entire way through, but a combination of these should get you moving in the right direction.
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • [Forum FAQ] How to find and replace text strings in the shapes in Excel using Windows PowerShell

    Windows PowerShell is a powerful command tool and we can use it for management and operations. In this article we introduce the detailed steps to use Windows PowerShell to find and replace test string in the
    shapes in Excel Object.
    Since the Excel.Application
    is available for representing the entire Microsoft Excel application, we can invoke the relevant Properties and Methods to help us to
    interact with Excel document.
    The figure below is an excel file:
    Figure 1.
    You can use the PowerShell script below to list the text in the shapes and replace the text string to “text”:
    $text = “text1”,”text2”,”text3”,”text3”
    $Excel 
    = New-Object -ComObject Excel.Application
    $Excel.visible = $true
    $Workbook 
    = $Excel.workbooks.open("d:\shape.xlsx")      
    #Open the excel file
    $Worksheet 
    = $Workbook.Worksheets.Item("shapes")       
    #Open the worksheet named "shapes"
    $shape = $Worksheet.Shapes      
    # Get all the shapes
    $i=0      
    # This number is used to replace the text in sequence as the variable “$text”
    Foreach ($sh in $shape){
    $sh.TextFrame.Characters().text  
    # Get the textbox in the shape
    $sh.TextFrame.Characters().text = 
    $text[$i++]       
    #Change the value of the textbox in the shape one by one
    $WorkBook.Save()              
    #Save workbook in excel
    $WorkBook.Close()             
    #Close workbook in excel
    [void]$excel.quit()           
    #Quit Excel
    Before invoking the methods and properties, we can use the cmdlet “Get-Member” to list the available methods.
    Besides, we can also find the documents about these methods and properties in MSDN:
    Workbook.Worksheets Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff835542(v=office.15).aspx
    Worksheet.Shapes Property:
    http://msdn.microsoft.com/en-us/library/office/ff821817(v=office.15).aspx
    Shape.TextFrame Property:
    http://msdn.microsoft.com/en-us/library/office/ff839162(v=office.15).aspx
    TextFrame.Characters Method (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff195027(v=office.15).aspx
    Characters.Text Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff838596(v=office.15).aspx
    After running the script above, we can see the changes in the figure below:
    Figure 2.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thank you for the information, but does this thread really need to be stuck to the top of the forum?
    If there must be a sticky, I'd rather see a link to a page on the wiki that has links to all of these ForumFAQ posts.
    EDIT: I see this is no longer stuck to the top of the forum, thank you.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • [Forum FAQ]Solution for Windows PowerShell console font issue when changing system locale

    Issue description
    After changing Windows System Locale to another country, users cannot modify Windows PowerShell console font to Lucida after modifying the font settings. There is also a potential bug report in Microsoft connect:
    https://connect.microsoft.com/PowerShell/feedback/details/806286/powershell-4-console-font-issue
    Reason
    In most situations, this problem is caused by system locale is changed to other countries from United States, such as Chinese, French, etc. Because of this change, the code page and font of Windows PowerShell console might be changed with system locale.
    For Example, if change system locale to Chinese (Simplified China), Windows PowerShell console
    (%systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools) properties would be changed like this:
    Solution
    To resolve this problem, please follow the steps below:
    Access to the path below to find the shortcut of Windows PowerShell:
    %systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools.
    Right click Windows PowerShell and choose Properties.
    Switch to Options, check if Current code page list there, if that it is, choose
    437 (OEM-United States) and click Apply. Maybe you will encounter an
    Access Deniedpop-up as the following picture.  Then you need take ownership of current PowerShell File, switch to
    Security Tab and obtain full control permission for current User Account.
    Note: if Current code page was not list there, just leave alone
    Options settings and switch to Font Tab.
    Switch to Font Tab, choose the font you wished to use, click
    Apply.
    After the above settings, current Windows PowerShell console font should works as you wished.
    Applies to
    Windows PowerShell 3.0
    Windows PowerShell 4.0
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Cause
    This issue is due to the bootmgr file, we cannot use the bootmgr file of Windows 7 to find the Windows 8 Operating System files.
    The Windows 7 bootmgr can indeed boot Windows 8.
    This is on a BIOS system 
    https://www.youtube.com/watch?v=AVO5aeaKeeE
    This is on a UEFI system 
    https://www.youtube.com/watch?v=g3-K6Fyobz0
    The Windows 8 bootmgr partially loads Windows 8 before offering the boot menu.  By choosing Windows 7, the system must do a reboot.  Using the Windows 7 bootmgr, no reboot is required.
    "Let them that don't want it have memories of not gettin' any." "Gratitude is riches and complaint is poverty and the worst I ever had was wonderful." Brother Dave Gardner. "Experience is what you get when you're looking for something
    else." Sir Thomas Robert Deware

  • [Forum FAQ]How to upgrade Windows Server 2008 R2 with a GUI to Windows Server 2012 Server Core

    We found that some customers willing to upgrade Windows Server 2008 R2 GUI to Windows Server 2012 Server Core recently. This article provides detailed steps to perform the upgrade.
    Analysis
    Upgrading from Windows Server 2008 R2 with a GUI installation to Windows Server 2012 with Server Core directly
    is not supported. If you do that, you will receive the error message below(Figure 1) in Compatibility report: 
    Figure 1.
    In these scenario, you can upgrade to Windows Server 2012 firstly. After the upgrade process is completed, you can switch freely between Server Core and Server with a GUI modes.
    Produces
    You can follow the steps below to perform an upgrade from Windows Server 2008 R2 with a GUI installation to Windows Server 2012 Server Core mode:
    1. Upgrade to Windows Server 2012 with a GUI mode
    1) Firstly, please boot into Windows Server 2008 R2 with a Windows Server 2012 installation DVD inserted.
    2) Select the operating system you want to install with a GUI mode.
    We can see 2 options (Server Core Installation or Server with a GUI) for each operating system version. (Figure 2)
    Figure 2.
    Note: Please make sure you have enough disk space on system partition. Or you will get such an error in Compatibility report.(Figure 3)
    Figure 3.
    After the Compatibility check, the installation will continue. It will take several minutes until upgrading is done.(Figure 4)
    Figure 4.
    2. Switch the GUI mode to Server Core
    Method 1: Using Server Manager
    1) Open Server Manager, click
    Manger and select “Remove Roles and Features” to start the
    Remove Roles and Features Wizard.
    2) In Features,
    uncheck the box next to the “User Interfaces and Infrastructure” option, and then click “Next”. (Figure 5)
    Figure 5.
    Now tick the “Restart the destination Server automatically if required” box, then click “Remove”. (Figure 6)
    Figure 6.
    Method 2: Using Windows PowerShell
    There are multiple ways to remove the GUI via Windows PowerShell, we introduce the way of using the ServerManager module.
    You can also run the commands in Windows PowerShell with an administrator to remove the GUI feature:
    “Import-Module ServerManager”
    “Uninstall-Windowsfeature Server-Gui-Shell –Restart”
    or
    “Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra –Restart”
    It will take a period of time to remove the GUI feature and reboot. When the system boots up, you will get into the Windows Server 2012 with Server Core mode. (Figure 7)
    Figure 7.
    More information:
    Switch between Full and Server Core in Windows Server 2012 using PowerShell 3.0
    http://blogs.technet.com/b/puneetvig/archive/2012/10/16/switch-between-full-and-core-in-windows-server-2012-using-powershell-3-0.aspx
    Windows Server Installation and Upgrade
    http://technet.microsoft.com/en-us/windowsserver/dn527667.aspx
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi,
    Brian is right, for mange the Server 2008r2 sp1 we recommend use the Windows 7 or 7.1 platform.
    More information:
    Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1)
    http://www.microsoft.com/en-us/download/details.aspx?id=7887
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • [Forum FAQ] How to deploy applications remotely

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • [Forum FAQ] Troubleshoot the error "The Remote Desktop Session Host server is in Per User licensing mode and No Redirector Mode"

    Symptom
    RD License server is a key component of RDS. It licenses users to access RDS servers.
    After purchase the required RDS CALs, we need to activate the RDS License server and install the purchased RDS CALs. However, during the installation or after installation, we may face errors
    about RDS License.
    In most cases, the following error may occur.
    Error:
    The Remote Desktop Session Host server is in Per User licensing mode and No Redirector Mode, but license server "Server name" does not have any installed licenses with the following
    attributes:
    Product version: Windows Server 2012
    Licensing mode: Per User
    License type: RDS CALs
    Troubleshooting
    1. Check whether the RD License Configuration is configured properly and there are no Warnings in the Event.
    2. The License Server should be part of 'RD Server License' group in Active Directory Domain Services.
    3. Check if the Licensing Mode is correct.
    - To change the Licensing Mode we can use RD Licensing diagnose, PowerShell cmdlet and Group Policy.
    Via PowerShell cmdlet:
    To change the licensing mode on RDSH/RDVH:
    $obj = get-wmiobject -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
    $obj.ChangeMode(value)
    # Value can be 2 - per Device, 4 - Per user
    Via Group Policy
    Path: Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing
    Use the specified RD license servers = FQDN of server name
    Set the Remote Desktop licensing mode =
    Per User
    However, if issue persists, please provide detailed information and post the question in the
    Remote Desktop Services (Terminal Services) forum.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi Richard,
    You need to uninstall Remote desktop session host feature. After removing it, you will default two connections which does not need to purchase RD CALs'.
    Thanks,
    Umesh.S.K

  • Windows server remote management / remote control agent

    I have installed ZFS 6.5. I have installed the agent on an windows server
    I have the consoleone snapins installed but there is no option to remote
    control in consoleone on the server object. The server does not show any
    sign of Zen remote control. Does the agent install include remote control
    agent? If not, were is the install located and how do you configure it?
    Also when getting packages what is the difference between ZFS 3.0 and the
    version that comes with Zfs 6.5?

    Corey,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • [Forum FAQ] A content management tool with dashboard based on SharePoint List

    1. 
    Scenario:
    The SharePoint OOTB List has saved us a lot of time on managing mess data. It provides three forms to create/view/edit items, the ability to save the views we want with some specific filtering and sorting condition, versioning for easy restoring, and we
    can make it advanced with workflow contains the specific business logic.
    However, if there is a need for better user experience, interacting with the public APIs and a bit of script to customize the web page would be required.
    Suppose there is a requirement like this:
    We need a content collection tool which collects ideas from contributors, the newly ideas will be reviewed by reviewers.
    We may need to filter the list in a convenient way, get the wanted result with the data from the list and display in a chart or rank list. 
    We can add some buttons in Metro style to display the counting result of the data from the list dynamically. When we click them, the list will be filtered and sorted to display a friendly set of items. Also, we need to display a trend of the mess data graphically
    in some beautiful charts.  If we want to find out some outstanding contributors, top contributor board would be more comfortable than the top N items in the OOTB list view.
    The page would look like this:
    2. 
    Introduction:
    Engineers will come up with some ideas in the daily job and write a content to enlighten others. Reviewers will help to review ideas or contents and publish the contents if qualified.
    The complete process looks like this:
    As we can see, only the approved idea can be written as a content and only the approved content can be published.
    2.1
    How it works
    We build the whole tool in one page. All ideas and contents will be saved in a custom list. This is how it looks like:
    There are three parts in this page:
    1       
    2       
    2.1       
    2.1.1       
    Top menu
    The top menu contains three elements:
    A Drop Down menu for filtering data by team, it will refresh the other two parts with the filtered data:
    A hyperlink “STATISTIC” links to a PowerBI report whose data source is the custom list.
    A hyperlink “FEEDBACK” for collecting feedbacks:
    The feedbacks will be saved in another list:
    2.1.2       
    Information menu
    This part will display the calculated data retrieved from the list within tiles, chart and ranking list.
    The tiles can be clicked to filter and refresh the list view.
    2.1.3       
    List view
    A list stores all ideas and contents with the properties needed. It can be filtered by the Top menu and Information menu.
    The customization on the OOTB custom list template makes it more powerful and more suit for this scenario:
    1. An item leveled comment feature (based on OOTB Tags & Notes feature) for other users make comments to an idea or content:
    2. Title column: When there is no attachment in the current item, it redirects to the default DisplayForm page. If there is, it will open the attachment (usually a .docx file) in Word Online in a new tab.
    3. ECB menu: Add some custom shortcuts for popular actions:
    4. A hyperlink column stores the hyperlink points to the website where the content is published to.
    3.   
    How to achieve it
    This solution will be hosted in SharePoint Online environment, so we do all the job using JavaScript, REST API and Client Object Model.
    The Drop Down menu, tiles, rank list are generated with some HTML+CSS.
    The Trend Chart, we take advantage of the Combo chart in the Google chart library.  
    The list view is hosted in a <iframe> which can be easily filtered and refreshed by just passing a generated URL with query string.
    For the customization on the list view and the ECB menu, JSLink with Client Object Model would be OK.
    3.1
    Specific to every part
    3.1.1       
    Top menu
    3.1.1.1 
    Drop Down menu for retrieving filtered data and refreshing the display of the related controls
    When user selects a team here, there will be a request sent out for retrieving items of the list. By default, the limit is 100 when using REST API to get list items, so we can append a “$top=1000” to require more items from server.
    Code snippet like this:
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items?$top=1000",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    console.log("getListItems succ");
    console.log(data);
    error: function (data) {
    alert("getListItems error");
    //failure(data);
    Then we will get the “data” as a JSON format string, it contains all the values we need from the list:
    We can get the values we want like this:
    //get item Count
    var arr = [], len;
    for(key in data.d.results)
    arr.push(key);
    len = arr.length;
    for(var ii=0; ii<len; ii++)
    var team = data.d.results[ii].Team;
    var month = data.d.results[ii].Month;
    As we need to know the counts of each type of ideas or contents, we use an array for saving the counters:
    //ary to store all counters for tiles: all/pendingIdea/pendingContent/my/approvedIdea/approvedContent
    var aryAllCounters = [0,0,0,0,0,0];
    for(var ii=0; ii<len; ii++)
    //get pendingIdeaCount
    if(data.d.results[ii].Statuss === 'Pending')
    aryAllCounters[1]++;
    Once all the numbers are ready, we can do the refreshing.
    As the list view page is hosted in a <iframe>, all we need to do is passing a constructed URL with query string:
    url_team = URL + "?FilterField1="+FIELD_MYTEAM+"&FilterValue1=" + sel_val;
    $iframe.attr('src', url_team);
    3.1.1.2 
    Hyperlink for popping up a dialog to collect feedbacks
    The feedback dialog hosts another page which contains two buttons and one text area.
    The HTML code of the FEEDBACK button:
    <a id="feedback" href="#" onclick="javascript:openDialogBox('../SitePages/Feedback.aspx');">FEEDBACK</a>
    The openDialogBox() function:
    function openDialogBox(url){
    var options = SP.UI.$create_DialogOptions();
    options.url = url;
    options.height = 130;
    options.width = 425;
    options.title = "Feedback";
    SP.UI.ModalDialog.showModalDialog(options);
    In the Feedback.aspx page, when user click submit button, we will save the content of the text area into the feedback list:
    function addListItem()
    this.clientContext = new SP.ClientContext.get_current();
    this.oList = clientContext.get_web().get_lists().getByTitle('Feedback');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = this.oList.addItem(itemCreateInfo);
    //set person field
    var userValue = new SP.FieldUserValue();
    //userValue.set_lookupId(this.currentUser.get_id());
    userValue.set_lookupId(_spPageContextInfo.userId);
    oListItem.set_item('Provider', userValue);
    //Sets the specified field value
    oListItem.set_item('Title', str);
    //datetime field
    var currDate = new Date();
    oListItem.set_item('Submit_Time',currDate);
    oListItem.update();
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded_add), Function.createDelegate(this, this.onQueryFailed));
    3.1.2       
    Information menu
    3.1.2.1 
    Tile shortcut
    In the click event of the tiles, the code will pass a generated URL with query string to the <iframe>:
    //filter list only
    $tile.click(function(){
    //distinguish tiles by id
    var v = $(this).attr('id');
    switch(v)
    case S_MY_CONTENT:
    url_team1 = URL + "?FilterField1="+FIELD_COMPOSER+"&FilterValue1=" + currentUsername;
    break;
    case S_PENDING_IDEA:
    url_team1 = url_team + "&FilterField2="+FIELD_STATUS+"&FilterValue2=Pending&FilterField3="+FIELD_IDEATYPE+"&FilterValue3=Idea";
    break;
    $iframe.attr('src', url_team1);
    3.1.2.2 
    Trend chart
    The chart will be initialized with the numbers by month stored in a 3D array:
    google.load("visualization", "1", {packages:["corechart"]});
    google.setOnLoadCallback(drawVisualization);
    function drawVisualization(ary)
    // Some raw data (not necessarily accurate)
    var data = google.visualization.arrayToDataTable(ary);
    var view = new google.visualization.DataView(data);
    view.setColumns([0, 1,
    { calc: "stringify",
    sourceColumn: 1,
    type: "string",
    role: "annotation"
    2]);
    // Create and draw the visualization.
    var ac = new google.visualization.ComboChart(document.getElementById('chart1'));
    ac.draw(view, {
    //legend: 'top',
    legend: {
    title : '',
    //width: 0,
    //height: 285,
    vAxis: {title: "", format:'#',viewWindowMode:'explicit',
    viewWindow:{
    min:0
    },ticks: ticks
    //hAxis: {title: ""},
    lineWidth: 4,
    bar: {groupWidth: "60%"},
    seriesType: "bars",
    series: {1: {type: "line"}},
    chartArea:{
    colors: ['#A4C400', '#F9A13B']
    3.1.2.3 
    Top contributors rank list
    When retrieving list items, we can get the “AuthorId” which represents the id of the user in the siteUserInfoList. We run another request to retrieve all items in the siteUserInfoList which stores the username with the URL of profile.
    Then we can use a hash table(provided by jshashtable.js) to store the user id, username and profile URL:
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/siteUserInfoList/Items",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    console.log(data);
    //get item Count
    var arr = [], len;
    for(key in data.d.results)
    arr.push(key);
    len = arr.length;
    var ht_authors = new Hashtable();
    for(var ii=0; ii<len; ii++)
    if(authorSet.contains(data.d.results[ii].Id))
    if(data.d.results[ii].Picture != null)
    ht_authors.put(data.d.results[ii].Id, data.d.results[ii].Title+'|'+data.d.results[ii].Picture.Url);
    else
    ht_authors.put(data.d.results[ii].Id, data.d.results[ii].Title+'|');
    console.log("ht_authors.keys(): "+ht_authors.keys());
    console.log("ht_authors.values(): "+ht_authors.values());
    error: function (data) {
    alert("error");
    //failure(data);
    3.1.3       
    List view
    For the Comment button, custom title link and the custom published link of each item, we can use JSLink to achieve.
    Comment button: It is supposed to be the OOTB “Type” column, I change the icon and modify the click event of it to pop up a comment dialog which take advantage of the OOTB “Tags&Notes” feature;
    Custom Title link: As there will be two situations of an item: has attachment or not. We will need to run a request to get the URL of attachment and change the hyperlink of the Title field accordingly:
    (function () {
    // Create object that have the context information about the field that we want to change it output render
    var linkFiledContext = {};
    linkFiledContext.Templates = {};
    linkFiledContext.Templates.Fields = {
    //"Attachments": { "View": AttachmentsFiledTemplate }
    "LinkTitle": { "View": TitleFieldTemplate },
    "Published_x0020_Link": { "View": PublishedLinkFieldTemplate },
    "DocIcon": { "View": DocIconFieldTemplate },
    "MyTeam": { "View": MyTeamFieldTemplate }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(linkFiledContext);
    function DocIconFieldTemplate(ctx)
    var htmlStr = "";
    var listId = ctx.listName;
    var itemId = ctx.CurrentItem.ID;
    var s = listId + "," + itemId;
    htmlStr += "<img width='16' height='16' class=' ms-draggable' alt='Comment' src='"+_spPageContextInfo.webAbsoluteUrl+"/Shared%20Documents/img/comment-icon.png' border='0' ms-draggableragId='0' onclick='CommentIcon(\""+ s +"\")'></img>";
    return htmlStr;
    function CommentIcon(s)
    var listId = s.split(',')[0];
    var itemId = s.split(',')[1];
    var url=_spPageContextInfo.webAbsoluteUrl+"/_layouts/15/socialdataframe.aspx?listid="+listId+"&id="+itemId+"&mode=1";
    console.log(url);
    openCustomDialog(url,"Comment",650,520);
    function openCustomDialog(pageUrl,title,width,height)
    SP.UI.ModalDialog.showModalDialog({
    url: pageUrl,
    width: width,
    height: height,
    title: title,
    dialogReturnValueCallback: function (result){
    if(result== SP.UI.DialogResult.OK)
    parent.window.location.href=parent.window.location.href;
    function PublishedLinkFieldTemplate(ctx)
    //console.log(ctx);
    var htmlStr = "";
    var itemPublishedLink = "";
    var itemPublishedLinkDesc = "";
    if((ctx.CurrentItem.Published_x0020_Link != ''))
    itemPublishedLink = ctx.CurrentItem.Published_x0020_Link;
    itemPublishedLinkDesc = ctx.CurrentItem["Published_x0020_Link.desc"];
    htmlStr = "<a href='" + itemPublishedLink + "' target='_blank'>" + itemPublishedLinkDesc + "</a>";
    return htmlStr;
    function MyTeamFieldTemplate(ctx)
    var htmlStr = "";
    var itemMyTeam = "";
    if((ctx.CurrentItem.MyTeam[0] != undefined) && (ctx.CurrentItem.MyTeam[0] != null))
    itemMyTeam = ctx.CurrentItem.MyTeam[0].lookupValue;
    htmlStr = itemMyTeam;
    return htmlStr;
    function TitleFieldTemplate(ctx) {
    console.log(ctx.CurrentItem);
    var itemId = ctx.CurrentItem.ID;
    var itemTitle = ctx.CurrentItem.Title;
    var listName = ctx.ListTitle;
    var siteUrl = _spPageContextInfo.webAbsoluteUrl;
    var listUrl = _spPageContextInfo.webAbsoluteUrl + "/Lists/" +listName;
    var fileNames = getAttachmentsNames(listName, itemId);
    console.log(fileNames);
    var fileNameAry = fileNames.split("|");
    var htmlStr = "";
    //check the attachment existence
    if(fileNameAry[0] != '')
    for(var j = 0; j < fileNameAry.length; j++)
    var fileName = fileNameAry[j];
    var s1 = "<a class=\"ms-listlink ms-draggable\" onmousedown=\"return VerifyHref(this, event, '1', 'SharePoint.OpenDocuments.3', '1";
    //1``https://microsoft.sharepoint.com/teams/spfrmcs
    var s2 = "/_layouts/15/WopiFrame.aspx?sourcedoc=";
    //2``/teams/spfrmcs/Lists/Content%20Pool
    var s3 = "/Attachments/";
    //3``137
    var s4 = "/";
    //4``[Forum FAQ] Highlight the list tab in Quick Launch when the list view changes.docx
    var s5 = "&action=default'); return false;\" href=\"";
    //5``https://microsoft.sharepoint.com/teams/spfrmcs/Lists/Content Pool
    var s6 = "/Attachments/";
    //6``137
    var s7 = "/";
    //7``[Forum FAQ] Highlight the list tab in Quick Launch when the list view changes.docx
    var s8 = "\" target=\"_blank\" DragId=\"1\">";
    //8``Highlight the list tab in Quick Launch when the list view changes
    var s9 = "</a>";
    var s = s1+siteUrl+s2+listUrl+s3+itemId+s4+fileName+s5+listUrl+s6+itemId+s7+fileName+s8+itemTitle+s9;
    htmlStr += s;
    //console.log(htmlStr);
    if (j != fileNameAry.length - 1)
    htmlStr += "<br/>";
    //if no attachments, set the <a> point to displayForm
    else
    htmlStr += "<a class='ms-listlink ms-draggable' onclick='EditLink2(this,28);return false;' onfocus='OnLink(this)' href='" + siteUrl + "/_layouts/15/listform.aspx?PageType=4&ListId=%7BE54A4FBB%2DDDC2%2D4F7E%2D8343%2D8A1C78757CF4%7D&ID=" + itemId + "&ContentTypeID=0x010079A1D928FF77984C80BFEF1D65C3809F' target='_blank' DragId='0'>" + itemTitle + "</a>";
    return htmlStr;
    function getAttachmentsNames(listName,itemId) {
    var url = _spPageContextInfo.webAbsoluteUrl;
    var requestUri = url + "/_api/web/lists/getbytitle('" + listName + "')/items(" + itemId + ")/AttachmentFiles";
    var str = "";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    async: false,
    success: function (data) {
    for (var i = 0; i < data.d.results.length; i++)
    if(i != 0)
    str += "|";
    str += data.d.results[i].FileName;
    error: function (err) {
    //alert(err);
    return str;
    3.2
    How to make them work together
    When selecting an option in the Drop Down menu, the Information menu and the List view will be refreshed separately.
    When clicking the tiles, only the list view will be filtered and refreshed, the other parts will not be influenced.
    When items created/modified, the whole page will be refreshed to keep all the numbers in each part updated.  A workflow will also be triggered to inform engineers or reviewers the progress of an item or content.
    3.3
    Other customizations
    3.3.1       
    ECB menu and permission control
    As we need to refresh the page when new item or modify item, we put all the form pages in a custom modal dialog and execute the refresh in the success callback function.
    There are three roles: Site owner, reviewer and engineer. They have limited privileges according to the roles they are:
    Site owner: Full control on the list, can see all the buttons in the ECB menu;
    Reviewer: There is another list which stores the names of each team and reviewers’ names of each team. The reviewer has limited full control only on the team they belong to. To other teams, the role can be seen as a visitor;
    Composer
    (create owner): The one who contribute an idea. For the ideas\contents from other teams, this role can be seen as visitor.
    The ECB menu they can see is:
    For the visitor, the ECB menu will only display a few buttons:
    The code:
    (function () {
    var viewContext = {};
    viewContext.Templates = {};
    viewContext.OnPostRender = OnViewPostRender;
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(viewContext);
    function OnViewPostRender(ctx) {
    $("a[title='More options']").removeAttr("onclick");
    $(".ms-list-itemLink").removeAttr("onclick");
    $("a[title='More options']").attr("onclick", "showMenuList(this);return false;");
    function showMenuList(obj) {
    var itemId = $(obj).parents("tr").attr("id").split(",")[1];
    //show ECB menu
    CoreInvoke('ShowECBMenuForTr', obj, event);
    var teamId = getCurrentTeamId("Content Pool", itemId);
    var styles = "";
    if (isSiteOwner("Technet SharePoint Team Owners")) {
    styles = "li[text='Delete Item ']{display:block;} li.ms-core-menu-separator:last-child{display:block;} ul.ms-core-menu-list > li:nth-last-child(5){display:block;} li[text='Edit Item ']{display:block;} li[text='Upload Document']{display:block;} li[text='Approve']{display:block;} li[text='Reject']{display:block;} li[text='Add Publish Link']{display:block;}";
    } else if (isReviewer("List1_FAQ_team", teamId, "Reviewers")) {
    styles = "li[text='Delete Item ']{display:block;} li.ms-core-menu-separator:last-child{display:block;} ul.ms-core-menu-list > li:nth-last-child(5){display:block;} li[text='Edit Item ']{display:block;} li[text='Upload Document']{display:block;} li[text='Approve']{display:block;} li[text='Reject']{display:block;} li[text='Add Publish Link']{display:block;}";
    } else if (isComposer(obj)) {
    styles = "li[text='Delete Item ']{display:block;} li.ms-core-menu-separator:last-child{display:block;} ul.ms-core-menu-list > li:nth-last-child(5){display:block;} li[text='Edit Item ']{display:block;} li[text='Upload Document']{display:block;} li[text='Approve']{display:none;} li[text='Reject']{display:none;} li[text='Add Publish Link']{display:none;}";
    } else {
    styles = "li[text='Delete Item ']{display:none;} li.ms-core-menu-separator:last-child{display:none;} ul.ms-core-menu-list > li:nth-last-child(5){display:none;} li[text='Edit Item ']{display:none;} li[text='Upload Document']{display:none;} li[text='Approve']{display:none;} li[text='Reject']{display:none;} li[text='Add Publish Link']{display:none;}";
    includeStyleElement(styles);
    //get current team id
    function getCurrentTeamId(listName,itemId){
    var teamId="";
    var requestUri = _spPageContextInfo.webAbsoluteUrl +
    "/_api/Web/Lists/getByTitle('"+listName+"')/items("+itemId+")?$select=MyTeamId";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    async: false,
    success: function (data) {
    if(data.d.MyTeamId!=null){
    teamId=data.d.MyTeamId;
    }else{
    teamId="0";
    error: function () {
    //alert("Failed to get details");
    return teamId;
    //check whether is owner
    //Technet SharePoint Team Owners
    function isSiteOwner(groupName) {
    var flag = false;
    var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/Web/effectiveBasePermissions";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    async: false,
    success: function (data) {
    var permissions = new SP.BasePermissions();
    permissions.fromJson(data.d.EffectiveBasePermissions);
    flag = permissions.has(SP.PermissionKind.managePermissions);
    error: function () {
    //alert("Failed to get details");
    return flag;
    function isComposer(obj) {
    var flag = false;
    var userId = _spPageContextInfo.userId;
    var composerId = $(obj).parents("tr").find("a[href*='userdisp.aspx']").attr("href").split("ID=")[1];
    if (composerId == userId) {
    flag = true;
    return flag;
    //check whether is reviewer
    function isReviewer(listName,teamId,peopleColumn){
    var flag=false;
    var userId=_spPageContextInfo.userId;
    // begin work to call across network
    var requestUri = _spPageContextInfo.webAbsoluteUrl +
    "/_api/Web/Lists/getByTitle('"+listName+"')/items?$select=ID&$filter=(ID eq '"+teamId+"' and "+peopleColumn+"Id eq '"+userId+"')";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    async: false,
    success: function (data) {
    if(data.d.results.length>0){
    flag=true;
    error: function () {
    //alert("Failed to get details");
    return flag;
    //insert style into page
    function includeStyleElement(styles) {
    var style = document.createElement("style");
    style.type = "text/css";
    (document.getElementsByTagName("head")[0] || document.body).appendChild(style);
    if (style.styleSheet) {
    //for ie
    style.styleSheet.cssText = styles;
    } else {
    //for w3c
    style.appendChild(document.createTextNode(styles));
    3.3.2       
    Workflow email customization
    The email will only be sent to engineer or team reviewer in the three scenarios:
    When engineer uploads an idea or content, reviewer will receive an email;
    When engineer uploads a content to an existing idea, reviewer will receive an email;
    When reviewer approve/reject an idea or content, engineer will receive an email;
    The design of the workflow process  :
     The email design like this:
    Email to engineer
    Email to reviewer
    Let us know if you are interested in it. Happy coding!
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    A good solution. Liked it very much. Can you please make it a technet blog for others.
    [email protected]

  • Connect via Windows Powershell in SCCM 2012 CONSOLE (with PowerShell 4.0 installed)

    Hi,
    When trying to "Connect via Windows Powershell" in the SCCM 2012 console, I get the message that Powershell 3.0 is not installed... (which actually isn't installed, we have PS4.0 installed). Do we need to install PS3.0 also to get it working
    or is there a workaround? Connecting manually to the site via Powershell 4.0 (Get-Psdrive -psprovider CMSITE) works like a charm.
    Regards,
    WiM

    Hi,
    I have installed WMF 4.0 on Windows Server 2008 R2 sp1, it works fine.
    Please try to use "$PSVersionTable" to confirm Powershell version is 4.0. At first, I forgot to install Microsoft .NET Framework 4.5, then the console gave me the message that Powershell 3.0 is not installed.
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • How Do You Use Your Blackberry--Email

    Hi, all, Being a Blackberry aficionado, I find all of the different things your Blackberry can do for you amazing.  One of the best features of all Blackberry devices is email.  With your email pushed directly to your device, you don't have to be nea

  • RENTED HD MOVIE NOT PLAYING

    I bought an Apple TV last week, and updated to the latest software. I rented an HD movie today with Apple TV, waited until it said "ready to view", then tried to play it. All I get is a white screen. I fast forward, and still nothing but a white scre

  • Reg : BPC 7.5 NW Docummentation

    Dear all, I am in the process of exploring BPC NW 7.5 version. So i searched for documnets in regard to this in SMP/help.sap ,found few guides..etc. My question is apart from these guides ,do we have likes of TAB Files (Eg: BPC 310/320 ..etc ),for BP

  • Creating Webservice with entity bean

    I am trying to create a webservice(using entity bean). Using ANT i am building up the .ear file. My source files are placed in a directory (c:\test) . I have set the path and invoked ANT .In the build.xml file , when it is trying to compile the ejb c

  • How to get program attributes

    Hello colleagues, it is possible to get the program attributes in a running program? I'm especially interested in the Selection Screen Number of the logical DB. I found that the Logical Database is in the SY-DBNAM, but I didn't find the selection scr