Tech and T-Accounts

Server 2012R2 - remote session time limits

I had a problem with Server 2012R2 automatically logging me out and closing any open applications (thereby losing all in process work product).  This bummed me out.

Found this helpful information which describes how to reset the timeout limits:

Use the 'Edit Group Polidy' administrative tool from the start menu (gpedit.msc - which controls Local Security Policy on that single machine).

Navigate through the folder list to the following locations:

Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits  (configured here for all users)
User Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits  (Not configured)

Change the following settings:

  • Set time limit for disconnected sessions  - Enable, set to never
  • Set time limit for active but idle Remote Desktop Services sessions  -- Not configured (may have to also Enable, set to never)
  • Set time limit for active Remote Desktop Services sessions -- Not configured
  • End session when time limits are reached -- Disabled
  • Terminate session when time limits are reached -- Not configured

Other changes that I've been known to need on VM installed 2012r2 OS:
And under the same Remote Desktop Session Host go to the Device and Resource Redirection folder, check that "Allow audio and video playback redirection" is Enabled, as well as making sure that in Administrative Tools->Services that the Windows Audio is both enabled and set to Automatic start.
Used Powershell commands to install >Install-WindowsFeature Desktop-Experience -- reboot, then with gpedit.msc remove Windows Components->Store  -- Enable all 'Turn off' features, then under User Configuration->Administrative Templates->Start Menu and Taskbar->Enable 'Do not allow pinning Store app to the Taskbar' and Disable 'Show Windows Store apps on the taskbar'
Lastly, navigate using File Explorer to %ProgramData%\Microsoft\Windows\Start Menu\Programs and remove the shortcuts for both 'Store' and 'PC Settings'

Can't find gpedit.msc?  Then try MMC.EXE. Go to File->Add/Remove Snap-In. Click "Group Policy Object Editor" in the left pane, then the "Add ->" button in the center.
In the "Select Group Policy Object" dialog, click the Browse button.
In the "Browse for a Group Policy Object" dialog, enter the name or the IP address of the computer to control.
OK all the way back to the main MMC window. Provided there are no firewall or security issues, you'll be working with the local Group Policy on the target system.


Tableau Export Crosstab - getting large numbers to 'look right'

Here’ a trick to use when Tableau’s Export Crosstab has String fields filled with large numbers. As you likely have found out, when the csv is opened by Excel, the Microsoft Jet Engine interprets to the default ‘General’ cell formatting. A Tableau string field with numbers is converted to Excel number values, with the result that leading zeros are dropped and, if it is a large number, being displayed in Scientific notation. This is typically not what users want to see for fields like account numbers. What they want is for the string number to come across into a formatted text cell, but that won’t happen.

So, an alternative is to create a text version dimension of the field by appending it with a non-printing character. The character I’ve used is the ‘En Quad’, which can be found in MS Word by inserting a Symbol, then typing 2000 in the character code field in the dialog box as shown below. Once the character is selected, then click Insert to place it into a MS Word document. For ease of finding this character, I typically insert it between two visible characters, like the !@ shown below.

Highlight the character between the two visible, copy it and then paste that into your Tableau calculated field equation, which would be something like this:

// Appends non-visible character to string “ ” + [field]

Use the new calculated field in your worksheet and when exported, the MS Jet Engine will interpret the column as text, showing the entire large number, even with leading zeros.

MS Symbol Dialog:
Smiley face

Sample insert between two visible characters:

        !!͏ @


PowerShell install version 4

PowerShell 4.0 added many features, but the one that mattered to me was the -append flag when exporting to csv. With this flag, if the csv file exists, then the rows of info are appended, if the file doesn't exist, then the file is created. While this could be done in older versions, that simple logic basically meant writing code to trap the file exist issue and then branch to the right export command.

So, the question becomes, how do you upgrade to PowerShell 4.0? Do you even have PowerShell 4.0? How do you tell what PowerShell version you have?
To determine the PowerShell engine version, use $PSVersionTable.PSVersion at the PowerShell command prompt. If this command doesn't work from the PowerShell command prompt, then the installed PowerShell is version 1.

Not sure whether PowerShell is installed because it doesn't show up in the Start menu? Well, you could check the registry -- HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell ... the version would come after that. Microsoft further explains the expected registry entries in this blog:

Me, I prefer working with the Windows PowerShell ISE, but the above command can also run from the PowerShell command line (kinda looks like a DOS window). Both options should show up by typing in PowerShell from the Start button then selecting the verison you want -  Windows PowerShell ISE or Windows PowerShell (command line version).  If you like the ISE like I do, then from the Start button type in ISE to get to the two versions (x86 which I don't use, and Windows PowerShell ISE (my preference). 

Here is the link from Microsoft -- Installing version 4 of PowerShell also updates features of the Windows Management Framework to version 4.0.

Another tidbit -- even with PowerShell installed, PC's typically are shipped with 'Execution Policies' not enabled for scripts to be run.  To modify this setting, a regedit is required. 

run PowerShell as administrator, then run the following command: Set-ExecutionPolicy RemoteSigned

Update - install Active Directory for PowerShell module in order to query Active Directory
Easiest way to install AD module is to run the following PowerShell command for Windows 8 and prior:  Add-WindowsFeature RSAT-AD-PowerShell

For Windows 10, download a package and install it with elevated privileges - instructions found here.

Further info on AD module installation: is where you'll find the Remote Server Administration for Windows 7 download, then follow the instructions found here -

Page 4 of 7 << < 1 2 3 4 5 6 7 > >>
Copyright© Brad Earle
Site Map | Printable View | © 2008 - 2021 KB Earle Associates LLC | |