Hi,
While working on Powershell V3 i have realised that Scripting are going to be easy. Scripters just need to add bunch of cmdlets to the scripts and done. In Powershell V3 Microsoft had make CMDLET for almost everything or for every task.
The main task which SYSADMINS do this installing extra windows features in to the server or to the desktops. These features may be setup a server a DHCP,DNS,FAX or a simple feature like installing or enabling XPS viewer.
I am using a fresh installation of “Windows Server 2012 Standard Edition with GUI” and i do often view and read “XPS formatted Documents”. BY Default the XPS file viewer is not installed on “Windows server 2012”.
So i think why not install it using the Powershell V3 cmdlet.
To get the list of all available/installed windows feature we can use the cmdlet
“Get-WindowsFeature”
The features those have [x] in the from of them means that they are installed. When you query any single feature using “Get-WindowsFeature” cmdlet then provide the NAME of the feature not the “Display Name”
Let’s see if the “XPS Viewer” is installed or not.
Get-WindowsFeature -Name “XPS-Viewer”
You can see that XPS-Viewer is available but it is not installed.
To install Windows features we have to use the cmdlet “Install-WindowsFeature”
Let’ install XPS-Viewer, run the below command line.
Install-WindowsFeature -Name “XPS-Viewer”
You can see it start Installing.
When installation is done it shows the below screen, that installation is “Successful” and Reboot is “Not required” .
let’s query the “XPS-Viewer” again using Get-WindowsFeature
Get-WindowsFeature -Name “XPS-Viewer”
and now we can see a [x] in the front of Display Name and the Install State in “Installed”
and we can see XPS Viewer on our Desktop too.
Nice isn’t.
Thanks
Aman Dhally
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.