Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Friday, 21 September 2012

Windows Server 2012 Core and Shell Tools

One of the main reasons for installing Windows Server 2012 Core is to reduce patching and the attack surface; however the downside of this means that you have no GUI so configuring the Server is only possible via PowerShell … well sorta!

image
Once you have installed Server Core 2012 you are greeted with a dos box.
image

Microsoft has changed Server Core and now allows you to install a MiniShell or the full Windows Shell.  If you enter a PowerShell session and type:

Get-WindowsFeature *gui*
(You will see that the two shell options are not installed)
image
To install the GUI tools you need to access the install.wim file; this is required because Server Core needs to access the missing files – Core is 3GB smaller. If you use the following command;
install-windowsfeature server-gui-mgmt-infra
(you may get “The request to add or remove features on the specified server failed”)
image
image
What we need to do is locate the index number for your Windows Server Core installation; index 2 is Standard and index 4 is Data Centre (index 1 and 3 refers to the Core installation media and will not have the missing files); in my scenario I had installed Server Core Standard – so index 2.
image
Install-WindowsFeature server-gui-mgmt-infra -source:wim:d:\sources\install.wim:2
(Where D: is my cd drive)
You can install both features by using;
Install-WindowsFeature server-gui-mgmt-infra,server-gui-shell -source:wim:d:\sources\install.wim:2
image
You must reboot the Server to complete the installation.
image
After the reboot Server Manger will start automatically; if you close Server Manager you can use the following commands.
image
We can use PowerShell to verify that the GUI Tools were installed.
image
You can also install the Full Shell as the binaries are now available locally by running the following command.
image
We can use PowerShell to verify that the Full GUI is installed.
image
The removal of the GUI Tools can be done one by one or remove both the Tools and Full Shell in one command as shown below.
image

Tuesday, 18 September 2012

Powershell Cheat Sheets

PowerShell Basic Cheat Sheet can be found here;
PowerShell Exchange 2010 Cheat Sheet can be found here;

Monday, 17 September 2012

Remote Server Administration Tools for Windows 8 (RTM)

Remote Server Administration Tools for Windows 8 includes Server Manager, Microsoft Management Console (MMC) snap-ins, consoles, Windows PowerShell cmdlets and providers, and command-line tools for managing roles and features that run on Windows Server 2012. In limited cases, the tools can be used to manage roles and features that are running on Windows Server 2008 R2 or Windows Server 2008. Some of the tools work for managing roles and features on Windows Server 2003.

image

More information can be found here;

Thursday, 6 September 2012

Windows Management Framework 3.0 aka PowerShell 3

Overview

Windows Management Framework 3.0 makes some updated management functionality available to be installed on Windows 7 SP1, Windows Server 2008 R2 SP1 & Windows Server 2008 SP2. Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI & WinRM.

Windows PowerShell 3.0
Some of the new features in Windows PowerShell 3.0 include:

  • Workflow
    Windows PowerShell Workflow lets IT Pros and developers apply the benefits of workflows to the automation capabilities of Windows PowerShell. Workflows allow administrators to run long-running tasks (which can be made repeatable, frequent, parallelizable, interruptible, or restart-able) that can affect multiple managed computers or devices at the same time.
  • Disconnected Sessions
    PowerShell sessions can be disconnected from the remote computer and reconnected later from the same computer or a different computer without losing state or causing running commands to fail.
  • Robust Session Connectivity
    Remote sessions are resilient to network failures and will attempt to reconnect for several minutes. If connectivity cannot be re-established, the session will automatically disconnect itself so that it can be reconnected when network connectivity is restored.

More information and downloads can be found here;

Sunday, 2 September 2012

Windows Server 2012 PowerShell Web Access

Windows PowerShell Web Access is a new feature in Windows Server 2012 that acts as a Windows PowerShell gateway, providing a web-based Windows PowerShell console that is targeted at a remote computer.

It enables IT Pros to run Windows PowerShell commands and scripts from a Windows PowerShell console in a web browser, with no Windows PowerShell, remote management software, or browser plug-in installation necessary on the client device.

All that is required to run the web-based Windows PowerShell console is a properly-configured Windows PowerShell Web Access gateway, and a client device browser that supports JavaScript and accepts cookies.

Quick Installation Guide;
Install-WindowsFeature -Name WindowsPowerShellWebAccess –IncludeAllManagementTools –Restart

Install-PswaWebApplication -UseTestCertificate
(valid for 90 days)

Add-PswaAuthorizationRule -UserName domain\username -ComputerName * -ConfigurationName *

Accessing Windows Powershell Web Access
https://hostname/pswa

More information can be found here, here and here.

Exchange 2010 Back Pressure

Back pressure is a system resource monitoring feature of the Microsoft Exchange Transport service that exists on Microsoft Exchange Server 2010 Hub Transport and Edge Transport servers. Exchange transport can detect when vital resources, such as available hard disk space and memory, are under pressure, and take action in an attempt to prevent service unavailability.

Back pressure prevents the system resources from being completely overwhelmed, and Exchange tries to deliver the existing messages. When utilization of the system resource returns to a normal level, the Exchange server gradually resumes normal operation.

Reference here and here;
Nice Powershell tool here;

Wednesday, 21 December 2011

Database Maintenance in Exchange 2010

A very good article on Exchange 2010 Database Maintenance; this should clear-up a lot of misconceptions (thanks Ross).

http://blogs.technet.com/b/exchange/archive/2011/12/14/database-maintenance-in-exchange-2010.aspx

Checking Database Free Space;

Get-MailboxDatabase MDB1 -Status | FL AvailableNewMailboxSpace

Monday, 8 August 2011

Exchange 2003 and Mailbox Language

Scenario; your in another country and you check your email via OWA and for some reason the language within OWA and Outlook changes?

Fix, try this:

1. Open control panel, expand "Regional and language options","Regional Option", select "English" or your chosen language.

2. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International] = "AcceptLanguage"="en-GB"

3. log off and log on to your machine

4. Start, Run

Outlook /resetfoldernames


Exchange 2010 and Mailbox Language

PowerShell prompt;

Set-Mailbox -Identity "Joe Blogs" -Languages "en-GB"

Language Codes

Tuesday, 19 July 2011

Exchange 2010 - Manage Full Access Permissions

You need to give another user access to a mailbox?

Use the Manage Full Access Permission wizard to grant Full Access permissions to users or groups for a selected mailbox. You can also use this wizard to remove Full Access permissions from users or groups.

When you grant the Full Access permission to another user for a mailbox, that user will be able to log on to the mailbox and access its entire contents.

Find the mailbox in the EMC (Exchange Management Console)

image

Right click the mailbox and “Manage Full Access..”

image

Click Add and Find/Select the User/Group you want to give access to.

image

Click Manage and the permissions will be applied.

 

PowerShell is much quicker though.

Adding Permissions

Add-MailboxPermission -Identity "mailbox_you_need_access_to" -User "user_or_group_looking_access" -AccessRights Fullaccess -InheritanceType all

Removing Permissions

Remove-MailboxPermission -Identity "mailbox_you_need_access_to" -User "user_or_group_remove_access" -AccessRight FullAccess -InheritanceType All

 

Adding the Mailbox into Outlook

In Outlook 2007/10 Open your account Settings ..

image

Select your account and click Change

image

Choose the More Settings ..

image

Add the email Account that you want to access.

image

Click Ok, Next and Finish.


From Outlook Web App (OWA)

Right Click your name above the Inbox.

image

Select Open User’s Inbox ..

image

Enter the name of the mailbox you want to open; and click Ok.

OR

In Outlook Web App, go to Options

image

Manage, Another User

image

Find the user and Click Ok.

image