Archive | Windows

Use Microsoft Assessment and Planning Toolkit to do inventory of the Windows servers

In this post I will show how to do inventory of servers with the tool Microsoft Assessment and Planning Toolkit (MAP). To be able to do this the servers needs to be accessed by WMI because MAP will use this technology to connect and collect information from servers.

Technet resources: https://technet.microsoft.com/library/bb977556.aspx

Download Microsoft Assessment and Planning Toolkit: https://technet.microsoft.com/en-us/solutionaccelerators/dd537566.aspx

Installation

The installation is very strait forward and can be run directly on a server. Just run the installation executable and follow the wizard.

MAP1

When the installation is done, create a database to store the data that is going to be collected.

MAP3

Inventory

To start doing inventory on the servers, click Server on the left side of the application.

MAP4

Then click “Collect inventory data”. This will bring up a wizard. To do inventory of Windows computers checkbox “Windows computers” and click next.

MAP5

Choose how you want to discover the servers to get the inventory from.

MAP6

MAP7

MAP8

To do inventory with “Windows Networking Protocols” one need to have started “Computer Browser” service. This service is disabled by default.

MAP9

MAP10

Add IP range if this is selected.

MAP11

At the ”All Computers Credentials” hit enter if the dialog below don’t show up. Add the accounts needed. For example different accounts that have access to enter different servers.

MAP13

Put the credentials in the order they should be used.

MAP14

MAP15

Click “Finish” to start the inventory.

MAP16

When the inventory is done the status is published in the dashboard. To get a report click on the dashboard, in my example I clicked “Windows Server 2012 R2” and then “Generate Windows Server 2012 R2 Report” to get an Excel report.

MAP17

Report

In the Excel report there are a lot of information regarding the servers. The information is divided in different Sheets in Excel. Below is a summary of what is covered in the report.

  • Windows Server 2012 R2 Assessment Summary
  • System Requirements Used in the Assessment
  • Assessment Results for Servers
  • Server Role Assessment Summary for Windows Server 2012 R2
  • Discovered Applications
  • Device Summary
  • Device Details
  • Inventory Results for All Windows Servers

Inventory Results in the Excel Sheet “Inventory Results for All Windows Servers”

Below is a screenshot of inventory results regarding the servers that is inventoried.

MAP18

More information that are included in the report.

  • Computer Name
  • WMI Status
  • Machine Type
  • Current Windows Server 2012 R2 Readiness
  • Installed Roles
  • Computer Model
  • Current Operating System
  • Service Pack Level
  • Active Network Adapter
  • IP Address
  • MAC Address
  • DNS Server
  • Subnet Mask
  • WINS Server
  • Registered User Name
  • Domain/Workgroup
  • Number of Processors
  • Number of Cores
  • Number of Logical Processors
  • CPU
  • System Memory (MB)
  • Video Card
  • Video Card Memory (MB)
  • Sound Card
  • Disk Drive
  • Disk Drive Size (GB)
  • Optical Drive
  • BIOS
  • BIOS Serial Number
  • BIOS Manufacturer
  • BIOS Release Date

Inventory Results in the Excel Sheet “Discovered Applications”

Below is a screenshot of the inventoried applications.

MAP19

0

Creating Nano Container VM with New-ContainerHost.ps1 script and not language en-us

If you, like me, are running an OS that do not use the language en-us then you can run into problems when building an Nano Container server with the script New-ContainerHost.ps1.

This is the error you can get.
12/08/2015 09:50:39 ========================================
12/08/2015 09:50:39 New-NanoServerImage Cmdlet Started
12/08/2015 09:50:39 ========================================
12/08/2015 09:50:39 The ‘sv-se’ directory does not exist in the ‘Packages’ directory (‘D:\NanoServer\Packages’).
at Test-Paths, D:\NanoServer\NanoServerImageGenerator.psm1: line 1406
at New-NanoServerImage<Process>, D:\NanoServer\NanoServerImageGenerator.psm1: line 634
at Cache-HostFiles, C:\New-ContainerHost.ps1: line 323
at New-ContainerHost, C:\New-ContainerHost.ps1: line 660
at <ScriptBlock>, C:\New-ContainerHost.ps1: line 1455
at <ScriptBlock>, <No file>: line 1
12/08/2015 09:50:39 Terminating due to an error. See log file at: C:\Users\u\AppData\Local\Temp\NanoServerImageGenerator.log

Creating Nano Container VM with New-ContainerHost.ps1 script and not language en-us1

To fix this, edit the script at line 323 by adding the parameter “-language en-us” at the end of the line.

New-NanoServerImage -MediaPath “$($driveLetter):\” -TargetPath $global:localVhdPath -Compute -Containers -ReverseForwarders -GuestDrivers -AdministratorPassword $Password -Language en-us

0

Start Services at boot time with script

If you, like me, have had problems with services that doesn’t start after rebooting a server, you can do this.

Create a PowerShell script that starts the service that you need to have started. When this is done create a Task Schedule that have a trigger that runs the task “At startup” and check the “Delay task for” and add some minutes. I have added 15 in this example.

Start Services at boot time with script

Belowe are some example scripts you can use or get inspired from.

First Script


 Second Script


Another Script

This script is just showing all Startup Types and their status if you need to see this by PowerShell.

 

0

Check ports in Firewall by registry in Windows 8.1

In this post I will cover how to check the firewall ports by the registry. Off course this can be done efficiently by Netsh but that will not be covered in this post.

To check the firewall ports in the registry open regedit and then the key below:

HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules

At this location you will find all your ports configured for your firewall.

If you want to find a certain rule just right click on the FirewallRules key and choose Find and search for the rule.

1

To add a rule do not edit the registry directly. Use Netsh or the GUI.

0