Exchange 2013 - How to monitor it with powershell command

This is a daily health check script which does the following 5 health checks.

1. DAG Active Manager Check

2. Mailbox Database Status

3. Dag mailbox database backup status

4. Mailflow test report

5. Mail queue status

If you want you can schedule it in task manager and you will have health check report emailed.

This is going to reduce some effort from the system administrators head and alert you on time to prevent a major issue.

Script - How to get printer IP list on print server

If you need to find association between printer name and IP Address here is relative command to utilize (we suppose that portname utilize default settings that include relative ip address):

get-wmiobject win32_printer -computername darequ001 | select Caption, Location, portname

Otherwise you can utilize this powershell scripts that export printer info to .xls file with portname and ip address separetely.

In this case, on machine where do you launch command, you need to have installed relative Excel program:

    Script to create a Excel spreadsheet with detailed information about
    the printers installed on the server
    Script was designed to give you a good description of how your print
    server(s) are installed and configured.
    * Requires Microsoft Excel be installed on the workstation you are running
    the script from.
.PARAMETER PrintServers
    Name of the server you wish to run the script again.  Can also be an
    array of servers.
    Excel spreadsheet
    .\Export-PrinterInfo.ps1 -PrintServers "MyPrintServer"
    .\Export-PrinterInfo.ps1 -PrintServers (Get-Content c:\scripts\myprintserverlist.txt)
    Author:            Martin Pugh
    Twitter:           @thesurlyadm1n
    Spiceworks:        Martin9700
       1.0             Initial Release
Param (
    [string[]]$PrintServers = "yourPrintServer"

# Create new Excel workbook
Write-Verbose "$(Get-Date): Script begins!"
Write-Verbose "$(Get-Date): Opening Excel..."
$Excel = New-Object -ComObject Excel.Application
$Excel.Visible = $True
$Excel = $Excel.Workbooks.Add()
$Sheet = $Excel.Worksheets.Item(1)
$Sheet.Name = "Printer Inventory"
$Sheet.Cells.Item(1,1) = "Print Server"
$Sheet.Cells.Item(1,2) = "Printer Name"
$Sheet.Cells.Item(1,3) = "Location"
$Sheet.Cells.Item(1,4) = "Comment"
$Sheet.Cells.Item(1,5) = "IP Address"
$Sheet.Cells.Item(1,6) = "Driver Name"
$Sheet.Cells.Item(1,7) = "Driver Version"
$Sheet.Cells.Item(1,8) = "Driver"
$Sheet.Cells.Item(1,9) = "Shared"
$Sheet.Cells.Item(1,10) = "Share Name"
$intRow = 2
$WorkBook = $Sheet.UsedRange
$WorkBook.Interior.ColorIndex = 40
$WorkBook.Font.ColorIndex = 11
$WorkBook.Font.Bold = $True

# Get printer information
ForEach ($PrintServer in $PrintServers)
{   Write-Verbose "$(Get-Date): Working on $PrintServer..."
    $Printers = Get-WmiObject Win32_Printer -ComputerName $PrintServer
    ForEach ($Printer in $Printers)
        If ($Printer.Name -notlike "Microsoft XPS*")
        {   $Sheet.Cells.Item($intRow, 1) = $PrintServer
            $Sheet.Cells.Item($intRow, 2) = $Printer.Name
            $Sheet.Cells.Item($intRow, 3) = $Printer.Location
            $Sheet.Cells.Item($intRow, 4) = $Printer.Comment
            If ($Printer.PortName -notlike "*\*")
            {   $Ports = Get-WmiObject Win32_TcpIpPrinterPort -Filter "name = '$($Printer.Portname)'" -ComputerName $Printserver
                ForEach ($Port in $Ports)
                    $Sheet.Cells.Item($intRow, 5) = $Port.HostAddress
            $Drivers = Get-WmiObject Win32_PrinterDriver -Filter "__path like '%$($Printer.DriverName)%'" -ComputerName $Printserver
            ForEach ($Driver in $Drivers)
            {   $Drive = $Driver.DriverPath.Substring(0,1)
                $Sheet.Cells.Item($intRow, 7) = (Get-ItemProperty ($Driver.DriverPath.Replace("$Drive`:","\\$PrintServer\$Drive`$"))).VersionInfo.ProductVersion
                $Sheet.Cells.Item($intRow,8) = Split-Path $Driver.DriverPath -Leaf
            $Sheet.Cells.Item($intRow, 6) = $Printer.DriverName
            $Sheet.Cells.Item($intRow, 9) = $Printer.Shared
            $Sheet.Cells.Item($intRow, 10) = $Printer.ShareName
            $intRow ++
    $WorkBook.EntireColumn.AutoFit() | Out-Null

$intRow ++ 
$Sheet.Cells.Item($intRow,1) = "Printer inventory completed"
$Sheet.Cells.Item($intRow,1).Font.Bold = $True
$Sheet.Cells.Item($intRow,1).Interior.ColorIndex = 40
$Sheet.Cells.Item($intRow,2).Interior.ColorIndex = 40
Write-Verbose "$(Get-Date): Completed!"

[original script location]

Exchange - How to rename standard mailboxes folder inside mailbox to different language.

The names of the mailboxes default Exchange (Inbox, Sent Mail, etc.) are created in the language used for the first access to the mailbox.

To override this problem you can do that from powershell on Exchange server:

Set-MailboxRegionalConfiguration -identity -LocalizeDefaultFolderName:$true -Language it-IT

Otherwise you need to go to:

OWA -> Options -> Settings -> region and here in addition to select the language you put the flag in the option Rename default folders with a name that matches the language specified.

[original article]

SCCM 2012 - List of Public Microsoft Support Knowledge Base Articles

This is a list of System Center Configuration Manager public KB articles and hotfixes published after the 2012 release.

note Note: Some updates are required only under certain circumstances, please read hotfix description before installing one.

[original Microsoft article]

2683915 A secondary site installation is not completed successfully when you type the default instance name in the Create Secondary Site WizardNo
2687393 A malformed command-line command for a Windows Installer-based Deployment Type may cause the initial and successive installation or removal to fail with an MSIExec error messageNo
2683908 An App-V application cannot be streamed to a client that has the "Bypass proxy server for local addresses" option setNo
2681449 Descriptions for the ResultDetail field values in "v_CH_EvalResults" viewNo
2683900 Changes to the Deployment Type for an application are deployed unexpectedly and cannot be rolled backNo
2680765 Changes that are made to Video Hardware Acceleration settings during a Remote Control session are reverted at the end of the sessionNo
2688277 The Configuration Manager Application Catalog does not function when you reinstall the "Application Catalog web service point" role by using different installation optionsNo
2680249 A failure is reported if you remove a zero value from the Return Codes tab under the properties of an application Deployment TypeNo
2688238 The Microsoft Network Inspection service that is started by Configuration Manager may be stopped by Active Directory Group PolicyNo
2679653 The lastLogonTimestamp attribute may not be accurateNo
2688247 SQL Server cumulative updates must be manually installed on secondary sites that use SQL Server Express

Apple - How to manage GPO on Macintosh client on Microsoft Domain

If you want to manage some centrally settings on Macintosh client on Microsoft domain there are two main options to follow.

1. Install Client plugin/tool that give you the ability to be compatible with Microsoft GPO
2. Install OSX Server that will coexist with Microsoft Domain.

Here they are some articles parts that I found on internet.

Mac Tools

OSX Server

There would be other options (like AD schema extension and so on but you could go deeper on that reading full articles that I mentioned above)



DirectControl from Centrify is also an Active Directory plug-in replacement. Besides the obligatory support for Active Directory authentication, a major feature of interest is support for GPOs: Windows administrators can use standard Windows tools to define GPOs for Mac clients that can specify certain management settings for user and computers. The ability to use a single set of tools to manage users, groups, and manage computers, no matter the OS is an important one for some organizations. Centrify also offers DirectControl for Linux and UNIX, which offers the possibility of using Active Directory to authenticate and manage all your platforms. More information on the Mac product is available at

Likewise Enterprise

Likewise Enterprise is yet another replacement for Apple's Active Directory plug-in. A unique feature of this product is the ability to store MCX data in Active Directory without extending the schema. This is similar in concept to what Centrify's DirectControl does, but with two important differences:

Administrators can not only define Group Policy Objects using the Microsoft Management Console, but they can also use Apple's Workgroup Manager application to define Mac-specific management settings

Because actual MCX data can be stored in AD, a wider range of management settings are supported.

Likewise Enterprise is also available for Linux and UNIX, again making it possible to use a single directory service for all your platforms. Additionally, Likewise offers an Active Directory management console that runs on Mac OS X and Linux. Visit for more information on this product. ... >

OSX Server installation

<... Essential Mac tools Nos. 16, 17, and 18: OS X Server, Apple's Open Directory, and Profile Manager

OS X may support Active Directory, but Apple's native directory is an LDAP-based solution called Open Directory.

Open Directory domains, hosted by OS X Server, afford centralized accounts all the advantages that Active Directory delivers for Windows, including secure Kerberos single sign-on and client management. This system, referred to as Managed Preferences (or abbreviated MCX), is entirely LDAP-based and allows for user/group/computer-based client management that rivals the capabilities of Group Policies in Active Directory for Mac clients.

In a dual-directory setup, Mac clients can be joined to both Open Directory and Active Directory, allowing for secure access to AD accounts and resources but with complete Open Directory client management applied.

In Lion Server, Apple introduced a new Profile Manager feature that supports iOS device management and Mac client management without the need for a directory service. This alternative offers the core security client management features with a simplified setup, though it is device/client-specific rather than more granular at the user or group level. ...>

Exchange - How to control non-delivery reports when you use Exchange 2000 or Exchange 2003

By default, non-delivery reports (NDRs) are enabled. You can disable them by using Exchange System Manager. You can also specify who can receive copies of NDRs.

To disable NDRs, follow these steps:
  1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
  2. Expand the Global Settings container in the left pane, click Internet Message Formats, right-click the Default object, and then click Properties.
  3. Click the Advanced tab.
  4. Click to clear the Allow non-delivery reports check box, and then click OK.
To specify who can receive copies of NDRs, follow these steps:
  1. Under Administrative Groups, expand First Administrative Group, expand Servers, expand servername, expandProtocols, expand SMTP, and then open the Default SMTP Virtual Server properties.
  2. Click the Messages tab, and then add an address to the Send copy of non-delivery report to field.
  3. Stop, and then restart the MS Exchange Routing Engine and SMTP services.
Microsoft recommends that you also create a postmaster e-mail address for NDRs that come from other servers. This can be a secondary SMTP address for a user or a mail-enabled User account. Use Active Directory Users and Computers to add the e-mail address or mail-enabled account.

The user will not receive the actual message that caused the NDR. However, if the notice is opened and Send Again is selected, the actual message appears and can be forwarded if you want.

[original article]

Wsus - How to migrate WSUS server on Windows 2003 mantaining same settings

If you want to migrate WSUS server from a server to another mantaining same settings here is relative procedure.

At first here is Microsoft article to install it on a 200x server.

About Windows Server 2012, Windows Server 2012 R2

After you installed wsus you set up new WSUS server be a replica of old WSUS server:


Start synchronization and download.

When it finished you need to disable synchronization:


Then you need to install on both servers this tool:

WSUS 3.0 API Samples and Tools

- On old Server you need to go to 

C:\Program Files\Update Services 3.0 API Samples and Tools\WsusMigrate\WsusMigrationExport 

wsusmigrationexport.exe settings.xml

- Copy that file to new server at this path:

C:\Program Files\Update Services 3.0 API Samples and Tools\WsusMigrate\WsusMigrationImport

e dare il comando:

wsusmigrationimport.exe settings.xml All None

Then you need to recreate same settings, approval rule like old WSUS server.

[update 2015.13]

I had Drive corruption on WSUS drive where db and packages was downloaded.

It was impossible to remote WSUS and reinstall it, the only solution it was utilizing this Microsoft article

To uninstall Windows Internal Database

  1. Open a command prompt.
  2. Type msiexec and the following key for the operating system platform:
    • For 32-bit platforms, use:
      msiexec /x {CEB5780F-1A70-44A9-850F-DE6C4F6AA8FB} callerid=ocsetup.exe
    • For 64-bit platforms, use:
      msiexec /x {BDD79957-5801-4A2D-B09E-852E7FA64D01} callerid=ocsetup.exe

%SystemDrive%\Program Files\Update Services\Tools\WsusUtil.exe reset


Related articles:

Veeam - Veeam Endpoint Backup FREE, Veeam Backup & Replication v8 Update 2 and Veeam Backup & Replication repository as a backup destination

from precedents articles we found that Veeam Released Backup program about pcs/laptop and bare metal server.

Veeam - Veeam Endpoint Backup Free - Free version released

Veeam - Veeam Endpoint free and centrilezed console Veeam Endpoint Backup for LabTech

At the same time they Veeam Backup & Replication v8 Update 2. Why is this update important for Veeam Endpoint Backup FREE? The answer is pretty simple – starting from Update 2 you can use a Veeam Backup & Replication repository as a backup destination. Besides using a Veeam Backup & Replication repository as a backup destination (target) you receive many more possibilities

here is Veeam Article that full explain how to setting up new remote repository:

Veeam - Veeam Endpoint free and centralized console Veeam Endpoint Backup for LabTech

From previous Blog's article you can view new Veeam Endpoint Free edition that is very useful about pcs backups.

Veeam - Veeam Endpoint Backup Free - Free version released

One feature that was missing it was centralized console about IT Administrators.

Veeam Endpoint Backup for LabTech is a solution specifically designed for service providers using the very well-known LabTech remote monitoring and management (RMM) platform.

Through the LabTech Control Center console, service providers will have the ability to back up, recover and manage customers’ endpoint devices (and some of those last remaining physical servers) from a single pane of glass.

Through the LabTech Control Center console, service providers will have the ability to back up, recover and manage customers’ endpoint devices (and some of those last remaining physical servers) from a single pane of glass.

Veeam Endpoint Backup for LabTech brings remote deployment, remote configuration of backup jobs, monitoring and centralized management into the service provider’s hands.

  1. System dashboard
  2. Remote deployment
  3. Configuration and monitoring
  4. Reporting
  5. Unique bare-metal recovery:  Veeam Endpoint Backup for LabTech offers the ability to provide remote bare-metal recovery

Combined with Veeam Backup & Replication™:

and the Veeam Backup & Replication Plug-in for LabTech, service providers will now have the ability to use the most known and established solution to protect their customers’ virtual servers, endpoints, and those last remaining physical servers.

Tips - Windows 7 upgrade with Windows Anytime Upgrade Feature

I found that exist Windows Anytime Upgrade Feature to automatically upgrade from Windows 7 professional to ultimate. 

here they are article that well explain procedure that you can use if you purchase Microsoft Serial number

rom Windows 7
Anytime Upgrade to Windows 7
Home Premium, Professional, Ultimate
Home Basic
Home Premium, Professional, Ultimate
Home Premium
Professional, Ultimate

Windows Anytime Upgrade is only available for online purchase in Australia, Belgium, Canada, Germany, France, Italy, Japan, the Netherlands, Spain, Sweden, Switzerland, the United Kingdom, and the United States.

Here they are some screenshots.

2012 R2 HyperV - How to apply deduplication to HyperV VM

Microsoft introduced deduplication in Windows 2012. 

In the first version deduplication concerned unstructured data, so in practice the server, but excluding the Exchange and SQL servers.

But in the version of Windows 2012 R2, Microsoft is introducing a specific support for the deduplication of virtual machines.

In fact, if you try to bring deduplication of a volume, including the options of the first "down" item appears Virtual Desktop Infrastructure (VDI) server.

This is because the VM is an ideal candidate for deduplication; in particular for the disk c: \ virtual machine (VHD and VHDX).

To utilize most of this features, here are a couple of tips:

  1. the virtual machine disks (VHD and VHDX) must NOT be placed on the same disk c: \ where runs Hyper-V, these volumes of deduplication is not supported; then you must create a new one and put yourself VMs.
  2. program the scheduler deduplication to a time "convenient" deduplication in fact requires a certain commitment of the CPU; then maybe schedule deduplication at night can be a good idea.

If you want to program the scheduler go in file & storage services.

[original italian article]

2003 migration - How to migrate print server from 2003 server to 2008/2008 R2/2012

During these days a lot of company are working hard to migrate 2003 server due to end of Microsoft support.

Here is relative procedure to be done on new server to migrate and import print server queue.

1. Install the Print Management Role on 2008 or 2012 server
2. Execute mmc --> Print server snapin then add your 2003 Print server.
3. Right Click on the old server and Select Export Printers to a file...
4. Click on Next and enter a file name.
5. Click on next and allow the export to finish.
6. Right Click on the new 2008 server and select Import printers from file...
7. Browse to the required file and select it.
8. Click on next and allow the import to happen.



- Install x64 drivers for each printer on the 2003 server. Windows Server 2008 R2 requires a native 64 bit driver. If the 64 bit driver is missing the Printer Migration Wizard will fail (For that printer).

From Microsoft article:

To migrate print servers by using Print Management

  1. Open Print Management.
  2. In left pane, click Print Servers, right-click the print server that contains the printer queues that you want to export, and then click Export printers to a file. This starts the Printer Migration Wizard.
  3. On the Select the file location page, specify the location to save the printer settings, and then click Next to save the printers.
  4. Right-click the destination computer on which you want to import the printers, and then click Import printers from a file. This launches the Printer Migration Wizard.
  5. On the Select the file location page, specify the location of the printer settings file, and then click Next.
  6. On the Select import options page, specify the following import options:
    • Import mode. Specifies what to do if a specific print queue already exists on the destination computer.
    • List in the directory. Specifies whether to publish the imported print queues in the Active Directory Domain Services.
    • Convert LPR Ports to Standard Port Monitors. Specifies whether to convert Line Printer Remote (LPR) printer ports in the printer settings file to the faster Standard Port Monitor when importing printers.
  7. Click Next to import the printers.

To migrate print servers by using a command prompt

  1. To open a Command Prompt window, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. Type:
    CD %WINDIR%\System32\Spool\Tools Printbrm -s \\ -b -f .printerExport
  3. Type:
    Printbrm -s \\ -r -f .printerExport

Additional considerations

  • The Printer Migration Wizard and Printbrm.exe can import custom forms and color profiles to the local computer only, and they do not support printer settings that are exported using the Print Migrator tool.
  • You can use the Task Scheduler feature of Windows to schedule the Printbrm.exe tool to regularly export or import printers. You can use this feature to supplement system backups.

Microsoft Print Migrator 3.1

[Update 2015-10]

interesting article more detailed:

Windows 10 - Introducing Windows 10 for IT Professionals, Preview Edition

Microsoft Press give us the ability to view and download relative ebook.

I high-light this ebook, about other offers you can open this link:

Introducing Windows 10 for IT Professionals, Preview Edition:

Get a head start evaluating Windows 10—with early technical insights from award-winning journalist and Windows expert Ed Bott. This guide introduces new features and capabilities, providing a practical, high-level overview for IT professionals ready to begin deployment planning now. This book is a preview, a work in progress about a work in progress. It offers a snapshot of the Windows 10 Technical Preview as of April 2015, on the eve of the BUILD Developers’ Conference in San Francisco.
 Download the PDF (6.39 MB)

Introducing Windows 10 for IT Professionals, Preview Edition

Tips - how to migrate PDQ deploy and PDQ inventory to another server

I already mentioned on very old post about PDQ deploy and PDQ inventory that is SCCM 2012 in "very light" version but it work quite well.

I take note about procedure to be done to migrate them to another server mantaining relative settings and licences.

The following keys and values are maintained under HKEY_LOCAL_MACHINE.
SOFTWARE\Admin Arsenal\PDQ Inventory
The folder where PDQ Inventory is installed.  This value is removed on uninstall and is needed for other applications to interact with PDQ Inventory.
This value will be in SOFTWARE\Wow6432Node\Admin Arsenal\PDQ Inventory on 64-bit system.
The Pro Mode license key, if it has been entered.  The key is stored exactly as it was sent to you so it can be exported or copied and pasted to a new computer.
Secure Key
One of the keys used to encrypt sensitive information in the database.  This key is generated when the system is installed and will need to be copied to a new computer if the database is moved.
Our support staff will never ask for this entry.
SOFTWARE\Admin Arsenal\PDQ Inventory Console
Disable Hardware Rendering
Used to troubleshoot issues with .NET GUI rendering on some systems.  When the application's windows aren't showing correctly, or at all, create this value as DWORD = 1.  This will cause the application to use only software rendering which fixes many of these issues.

Tips - How to restore Dell Vostro 3450 to original O.S. Settings

Click RESTORE and then confirm.

The process should take between 6 and 10 minutes to complete.

When it is done you will have to click FINISH and let it boot and reboot to complete the factory reinstall.

Once all of that is done you will need to complete all of your updates and reinstall any programs you had before the reinstall.