sexta-feira, 11 de dezembro de 2015

Windows Server 2012 Deduplication is Amazing!

http://www.expta.com/2013/02/windows-server-2012-deduplication-is.html

The following article describes how to use Windows Server data deduplication on an Solid State Drive (SSD) that holds active Hyper-V virtual machines.

Coloring Outside the Lines Statement:
This configuration is not supported by Microsoft.  See Plan to Deploy Data Deduplication for more information.  Use these procedures at your own risk. That said, it works great for me.  Your mileage may vary.

A while back I decided to add another 224GB SATA III SSD to my blistering Windows Server 2012 Hyper-V server for my active VMs.  The performance is outstanding and it makes the server dead silent.  I moved my primary always-on HyperV VM workloads to this new SSD:

  • Domain Controller on WS2012
  • Exchange 2010 multi-role server on WS2012
  • TMG server on WS2008 R2
These VMs took 134GB, or 60%, of the capacity of the drive which was fine at the time.  Later, I added a multi-role Exchange 2013 server which took up another 60GB of space.  That left me with only 13% free space, which didn't leave much room for VHD expansion and certainly not enough to host any other VMs.  Rather than buy another larger and more expensive SSD, I decided to see how data deduplication performs in Windows Server 2012.
Add the Data Deduplication Feature
Data Deduplication is a feature of the File and Storage Services role in Windows Server 2012.  It's not installed by default, so you need to install it using the Add Roles and Features Wizard (as above) or by using the following PowerShell commands:
PS C:\> Import-Module ServerManager
PS C:\> Add-WindowsFeature -Name FS-Data-Deduplication
PS C:\> Import-Module Deduplication

Next, you need to enable data deduplication on the volume.  Use the File and Storage Services node of Server Manager and click Volumes.  Then right-click the drive you want to configure for deduplication and select Configure Data Deduplication, as shown below:

Configuring Data Deduplication on Volume X:
So far, this is how you normally configure deduplication for a volume.  You would normally configure deduplication to run on files older than X days, enable background optimization, and schedule throughput optimization to run on at specified days and times.  It's pretty much a "set it and forget it" configuration.

From here on I'm going to customize deduplication for my Hyper-V SSD.

In the Configure Data Deduplication Settings for the SSD, select Enable data deduplication and configure it to deduplicate files older than 0 days. Click the Set Deduplication Schedule button and uncheck Enable background optimization, Enable throughput optimization, and Create a second schedule for throughput optimization.

Enable Data Deduplication for Files Older Than 0 Days

Disable Background Optimization and Throughput Optimization Schedules
Click OK twice to finish the configuration.  What we've done is enabled data deduplication for all files on the volume, but deduplication will not run in real-time or on a schedule.  Note that these deduplication schedule settings are global and affect all drives configured for deduplication on the server.

You can also configure these data deduplication settings from PowerShell using the following commands:
PS C:\> Enable-DedupVolume X:
PS C:\> Set-Dedupvolume X: -MinimumFileAgeDays 0
PS C:\> Set-DedupSchedule -Name "BackgroundOptimization", "ThroughputOptimization", "ThroughputOptimization-2" -Enabled $false
This configuration mitigates the reason why Microsoft does not support data deduplication on drives that host Hyper-V VMs.  Mounted VMs are always open for writing and have a fairly large change rate.1  This is the reason Microsoft says, "Deduplication is not supported for files that are open and constantly changing for extended periods of time or that have high I/O requirements."

In order to deduplicate the files and recover substantial disk space you need to shutdown the VMs hosted on the volume and then run deduplication manually with this command:
PS C:\> Start-DedupJob –Volume X: –Type Optimization
This manual deduplication job can take some time to run depending on the amount of data and the speed of your drive.  In my environment it took about 90 minutes to deduplicate a 224GB SATA III SSD that was 87% full.  You can monitor the progress of the deduplication job at any time using the Get-DedupJob cmdlet.  The cmdlet shows the percentage of progress, but does not return any output once the job finishes.

You can also monitor the job using Resource Monitor, as shown below:

Process Monitor During Deduplication
Here you can see that the Microsoft File Server Data Management Host process (fsdmhost.exe) is processing the X: volume.  When the deduplication process completes, the X: volume queue length will return to 0.

Once deduplication completes you can restart your VMs, check the level of deduplication, and how much data has been recovered.  From the File and Storage Services console, right-click the volume and select Properties:

Properties of Deduplicated SSD Volume
Here we can see that 256GB of raw data has been deduplicated to 61.5GB on this 224GB SSD disk - a savings of 75%!!!  That leaves 162GB of raw disk storage free.  I could easily create or move additional VMs to this disk and run the deduplication job again.

The drive above now actually holds more reconstituted data than the capacity of the drive itself with no noticeable degradation in performance.  It currently hosts the following active Hyper-V VMs:

  • Domain Controller on WS2012
  • Exchange 2010 multi-role server on WS2012
  • TMG server on WS2008 R2
  • Exchange 2013 multi-role server on WS2012
  • Exchange 2013 CAS on WS2012
  • Exchange 2013 Mailbox Server on WS2012
Caveats:
  • Because real-time optimization is not being performed, the VMs will grow over time as changes are made and data is added. The manual deduplication job would need to be run as needed to recover space.
  • Since the SSD actually contains more raw duplicated data than the drive can hold, I'm unable to disable deduplication without moving some data off the volume first.
  • Even though more VMs can be added to this volume, you have to be sure that there is sufficient free space on the volume to perform deduplication.
For even more information about Windows Server 2012 data deduplication, I encourage your to read Step-by-Step: Reduce Storage Costs with Data Deduplication in Windows Server 2012!
I hope you find this article useful in your own deployments and I'm interested to know what your experience is.  Please leave a comment below!

Lab Server Builds and Parts Lists (Dec-2015)

http://www.expta.com/2015/07/expta-gen6-home-lab-server-builds-and.html


Build your own blistering fast Windows Hyper-V lab server starting at $900!

I'm very pleased to provide you my latest EXPTA Gen6 home lab server builds. Advances in hardware and virtualization technology have made it possible for IT Pros to build sophisticated systems that host more VMs than ever before. My Home Lab Server Survey results show that while there's still tremendous interest in 32GB entry-level servers at around $1,000, there's also a lot of interest in 64GB servers at the $1,700 price point.

Based on these survey results and for the fist time ever, I'm providing three different server builds:

  • Intel Core i5 quad-core, 32GB RAM, SSD, small form-factor for $900. I can finally break the $1,000 barrier without sacrificing quality! This makes it super-easy for IT Pros to build a blistering fast Windows Hyper-V server that can run many VMs.
  • Intel Core i7 hex-core, 64GB RAM, SSD, ATX form-factor for $1,725. This build is geared toward those who want double the VM density and outstanding performance.
  • Intel Xeon E5 hex-core, 64GB RAM, SSD, ATX form-factor for $1,835. This build uses true server hardware for the ultimate in reliability and scalability.
Each of the three server builds use components from the vendors' hardware compatibility lists to ensure the utmost in reliability. They will all run Windows Server 2012 R2 and should be "future-proof" to run the upcoming Windows Server 2016 release.

Each build uses the same storage format -- a 256GB SSD for the OS, a 500GB or 1TB SSD for regularly running high performance VMs, and a 1TB traditional hard drive for storing ISOs, software applications, and base images. Each server utilizes SATA III 6Gb/s drives and USB 3.0 ports for the fastest I/O performance.

Most survey respondents indicated that they did not need step-by-step installation guides. If you do need help, look back at my previous Gen4 and Gen5 server build articles for assistance.

As usual, I link to Amazon for components and prices. Amazon does a very good job of maintaining stock, has an excellent return policy, and most of these items are eligible for free two-day shipping via Amazon Prime. If you don't have Prime, you can sign up for a free trial here and cancel after you order the equipment if you want. Please note that it's normal for Amazon prices to fluctuate (usually down) over time.



Add an IP Block List Provider to Exchange Server 2013 Edge Transport

One of the transport agents that is installed on the Exchange 2013 Edge Transport server is the connection filter agent.
[PS] C:\>Get-TransportAgent

Identity                                           Enabled         Priority
--------                                           -------         --------
Connection Filtering Agent                         True            1
Address Rewriting Inbound Agent                    True            2
Edge Rule Agent                                    True            3
Content Filter Agent                               True            4
Sender Id Agent                                    True            5
Sender Filter Agent                                True            6
Recipient Filter Agent                             True            7
Protocol Analysis Agent                            True            8
Attachment Filtering Agent                         True            9
Address Rewriting Outbound Agent                   True            10
 
The connection filter agent looks at the IP address of a server that is making an SMTP connection to the Edge Transport server and decides whether to block or allow the connection. It makes the decision by looking up the IP address in a block list, allow list, or by querying a block/allow list provider.

When your Exchange organization is receiving spam you can add the IP addresses of the spammers to an IP block list on the Edge Transport server. However this is quite inefficient, as you’ll constantly be adding new IP addresses to the list.

A more effective approach is to use one or more IP block list providers, such as Spamhaus (my personal favourite) or SpamCop.

To add Spamhaus to your connection filter agent run the follow Exchange Management Shell command on the Edge Transport server.

[PS] C:\>Add-IPBlockListProvider -Name Spamhaus -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"

Note you can change the rejection message that it sent back to the sender.
 
[PS] C:\>Set-IPBlockListProvider Spamhaus -RejectionResponse "IP address is listed by Spamhaus Zen."

You can add multiple providers, just make sure you check their guidance on whether there are issues adding multiple lookup domains from the same provider. Also make sure you check their terms and conditions and comply with any commercial usage policies they have.
 
[PS] C:\>Get-IPBlockListProvider
 
 Name                                    LookupDomain                            Priority
----                                    ------------                            --------
Spamhaus                                zen.spamhaus.org                        1
SpamCop                                 bl.spamcop.net                         2
After the block list provider has been in place for a day or two you can see the results by running the Get-AntispamTopRBLProviders.ps1 script that ships with Exchange.
[PS] C:\Program Files\Microsoft\Exchange Server\V15\scripts>.\get-AntispamTopRBLProviders.ps1

Name     Value
----     -----
Spamhaus    12

quarta-feira, 25 de novembro de 2015

How to Defrag an Exchange 2010 Mailbox Database

 

http://exchangeserverpro.com/defrag-exchange-2010-mailbox-database/

 

Exchange Server 2010 mailbox databases grow in size as the data within them grows. But they will never shrink when data is removed from them.

For example if you have a 20Gb mailbox database file and move 4Gb worth of mailboxes to another database, the file will remain at 20Gb in size.

However, the database itself will have 4Gb of “white space” in it, which is space that is available for new data to be written without growing the size of the file.

Your options to reclaim that space are to either:

  • Create a new mailbox database and move all the mailboxes to that database
  • Perform an offline defrag of the existing database to shrink the file

Each option has pros and cons. An offline defrag involves an outage for all users on that database, but may be more convenient if there is not additional storage available to allocate to the Exchange server to hold the new database.

On the other hand a mailbox migration has fewer risks, can be less disruptive as a whole, but will generate a lot of transaction logging that needs to be kept under control so it may take longer (ie several nights/weekends to migrate) as opposed to just one outage for a defrag.

Determining Free Space in an Exchange 2010 Mailbox Database

In Exchange 2010 you can see how big your mailbox databases are, and how much white space they have, by running the following command in the Exchange Management Shell.

[PS] C:\>Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

Name DatabaseSize AvailableNewMailboxSpace
---- ------------ ------------------------
MB-HO-01 18.26 GB (19,604,766,720 bytes) 9.544 GB (10,247,766,016 bytes)
MB-HO-02 15.63 GB (16,785,670,144 bytes) 3.696 GB (3,968,761,856 bytes)
MB-HO-Archive-01 648.1 MB (679,542,784 bytes) 134.6 MB (141,164,544 bytes)

In the example above the database MB-HO-01 is 18.26Gb in size but has 9.544Gb white space due to archiving that has occurred. If you want to reclaim that disk space then the file can be shrunk by using eseutil to defrag it.

In this example I will demonstrate how to defrag a mailbox database for a single Exchange 2010 Mailbox server that is not a member of a Database Availability Group.

Do not follow the procedure in this document if your Mailbox server is a member of a DAG. Before you defrag any mailbox database please read and understand the pros and cons of this operation and make the best decision for your specific situation.

Preparing to Defrag an Exchange 2010 Mailbox Database


The first thing to be aware of when planning a defrag is that you can only perform this task when the database is dismounted. This means that users with mailboxes on that database will not be able to access their email while you are defragging it.

The second thing to be aware of is that you need some available disk space to perform the defrag. This is because a new file is written during the defrag process, so for a period of time both the old and new files will exist, as well as a temporary file that eseutil creates.

So to plan for an Exchange 2010 mailbox database defrag you need an amount of free space equivalent to 1.1x the predicted size of the new file.

In this example that would be:


18.26 – 9.544 = 8.7

8.7 x 1.1 = 9.57


In other words, I’ll need about 10Gb of free disk space to run this defrag. Since I don’t have that much free space on the same drive as the database I will need to specify a different temporary location when I run eseutil. This can be another local drive or a UNC path, just be aware that if you are using a UNC path the defrag will take longer due to network latency.

Before proceeding you should be sure that you have a good, working backup that you can use for recovery if something goes wrong during the defrag.

Using ESEUtil to Defrag an Exchange 2010 Mailbox Database


Open the Exchange Management Shell and navigate to the folder containing the database file.

cd D:\Data\MB-HO-01

Dismount the mailbox database.

Dismount-Database MB-HO-01

No run ESEUtil to defrag the file.

[PS] D:\Data\MB-HO-01>eseutil /d MB-HO-01.edb /t\\testserver\defrag\temp.edb

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 14.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating DEFRAGMENTATION mode...
Database: MB-HO-01.edb

Defragmentation Status (% complete)

0 10 20 30 40 50 60 70 80 90 100
|----|----|----|----|----|----|----|----|----|----|
...................................................

Moving '\\testserver\defrag\temp.edb' to 'MB-HO-01.edb'...
File Copy Status (% complete)

0 10 20 30 40 50 60 70 80 90 100
|----|----|----|----|----|----|----|----|----|----|
...................................................

Note:
It is recommended that you immediately perform a full backup
of this database. If you restore a backup made before the
defragmentation, the database will be rolled back to the state
it was in at the time of that backup.

Operation completed successfully in 3788.218 seconds.

Mount the database again.

mount-Database MB-HO-01

You can now see that the file is smaller, and all the white space is gone.

Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

Name DatabaseSize AvailableNewMailboxSpace
---- ------------ ------------------------
MB-HO-01 8.328 GB (8,942,190,592 bytes) 5.219 MB (5,472,256 bytes)
MB-HO-02 15.63 GB (16,785,670,144 bytes) 3.696 GB (3,968,761,856 bytes)
MB-HO-Archive-01 648.1 MB (679,542,784 bytes) 134.6 MB (141,164,544 bytes)

As you saw when ESEUtil completed you should run a full backup of the database at your next backup window.

How to use Nslookup to verify MX record configuration

 

The example below shows how MX records appear for the fictitious domain, example.com.

C:\> nslookup

Default Server: pdc.corp.example.com

Address: 192.168.6.13

> server 172.31.01.01

Default Server: dns1.example.com

Address: 172.31.01.01

> set q=mx

> example.com.

Server: dns1.example.com

Address: 10.107.1.7

example.com MX preference = 10, mail exchanger = mail1.example.com

example.com MX preference = 10, mail exchanger = mail2.example.com

example.com MX preference = 10, mail exchanger = mail3.example.com

example.com MX preference = 10, mail exchanger = mail4.example.com

example.com MX preference = 10, mail exchanger = mail5.example.com

mail1.example.com internet address = 172.31.31.01

mail2.example.com internet address = 172.31.31.02

mail3.example.com internet address = 172.31.31.03

mail4.example.com internet address = 172.31.31.04

mail5.example.com internet address = 172.31.31.05

In this example, the preconfigured DNS server is behind a proxy server. Therefore, an external or Internet DNS server with a known IP address of 172.31.01.01 was used to perform the query. Next, the query type was set to MX to locate the mail exchangers for example.com. In this example, five SMTP servers are equally balanced, each with its own IP address. However, your domain might only have a single entry, as seen in the following example:

contoso.com MX preference = 10, mail exchanger = mailbox.contoso.com

mailbox.contoso.com internet address = 10.57.22.3

segunda-feira, 23 de novembro de 2015

Removing a Mailbox from Quarantine in Exchange Server 2013

 

n Exchange Server 2010 the process required more manual work (you can check the step by step http://itprocentral.com/releasing-a-mailbox-from-exchange-server-2010-quarantine/ ), however a new set of cmdlets *-MailboxQuarantine were introduced and they help the administrator to add and remove mailboxes in the quarantine.

A good way to check a list of all mailboxes that are being quarantined is using the following cmdlet:

Get-Mailbox –Server <Server-Name> –ResultSize unlimited | Get-MailboxStatistics | Where-Object { $_.IsQuarantined –eq $True } | Select DisplayName,IsQuarantined,QuarantineEnd

In order to remove a mailbox from there, just use the following the cmdlet:

Disable-MailboxQuarantine <mailbox>

 

http://itprocentral.com/removing-a-mailbox-from-quarantine-in-exchange-server-2013/

quinta-feira, 12 de novembro de 2015

10 must-have Windows server tools

 

http://www.techrepublic.com/blog/10-things/10-must-have-windows-server-tools/

How to Extend the Virtual Disk Size of a XenVM

This article contains the following procedures:
Extending the disk size in XenServer
Extending a partition size in Windows operating systems using the DiskPart utilityExtending a partition size in Linux operating systems

  • Shut down the corresponding VM.
  • Go to XenServer Command Line Interface (CLI).
  • Find Virtual Disk Image (VDI) Universally Unique Identifier (UUID) by running the following command:
  • # xe vm-disk-list vm=<vm name>
  • Run the following command to resize the VDI:
  • #xe vdi-resize uuid=<vdi uuid> size=GiB, MiB
  • Right Click My Computer and select Manage.
  • Select Disk Management and right click on the disk you want to extend and select Extend:
  • Launch a command prompt.
  • Type in diskpart and press Enter.
  • At the diskpart prompt, enter the following commands:
  • DISKPART>list volume
  • DISKPART>select volume # (For # enter the number of the volume you want to resize)
  • DISKPART>extend size=n (n is size in Megabytes that you are adding to the volume>
  • After you finish your work type exit to close DiskPart.
  • Type exit to exit the command prompt.
  • Click Restart. You might be asked to restart one more time once the operating system starts.
  • If you use ext3: After resizing the disk in XenServer, start the operating system and use the resize2fs tool with the name of the partition that should be extended (refer to the manual for more details). For example to resize a data partition:

  • #umount /dev/xvdc1
  • #fdisk /dev/xvdc1
  • #d (Delete the partition and recreate it)
  • #n (New partition)
  • #w (Write out table)
  • #e2fsck -f /dev/xvdc1
  • #resize2fs /dev/xvdc1
  • #mount /dev/xvdc1 /home
  • Shutdown the VM.

  • Set the VM to boot into single-user mode on the XenServer host CLI
  • #xe vm-param-set uuid=6f04... PV-args=single
  • Boot VM and show disk list make partition table changes in the Linux VM
  • #fdisk -l

  • fdisk /dev/xvda
  • d -Delete Partition
  • n -New create new partition
  • p -Primary
  • 1- Partition number
  • Default values for size
  • w -Write changes

  • reboot vm
  • Note: If you need to run FSCK, you must boot from rescue media.
  • Resize the filesystem:
  • resize2fs /dev/xvda1

  • On XenServer host:

  • Remove the single-user boot mode setting:
  • #xe vm-param-set uuid=6f04... PV-args=
  • If you use xfs: After resizing the disk in XenServer, start the operating system and use the xfs_growfs tool with the name of the partition that should be extended (refer to the manual for more details). For example:
  • # xfs_growfs /dev/xvda1
  • If you use reiserfs: After resizing the disk in XenServer, start the operating system and use the resize_reiserfs tool with the name of the partition that should be extended (refer to the manual for more details). For example:
  • # resize_reiserfs /dev/xvda1
  • How to extend the size of the disk in XenServer:

    With XenCenter 5.6, you can select the VDI from the Storage tab of the virtual machine click Properties, select Size and Location, then increase the size of the disk without using the command line.
    How to extend the partition size in Windows operating systems:
    These steps are also demonstrated in the video HowTo: Extend the Virtual Disk Size of a XenServer VM (Part 1 of 2).
    Using Disk Management:
    Note: This procedure works on Windows 2008 and Windows 7 for both data and system partitions. In Vista you can use this to extend a data partition only.




    This starts the Extend Volume Wizard. Follow the prompts to complete the process.
    Using the DiskPart utility:
      Refer to DiskPart Command-Line Options for more information.

      How to extend the partition size in Linux operating systems:
    These steps are also demonstrated in the video HowTo: Extend the Virtual Disk Size of a XenServer VM (Part 2 of 2).
    Linux operating systems supports many file system types (for example, ext3, xfs, reiserfs). To extend file systems on an extended disk you must use file system tools that correspond to a particular file system type. Recommended file systems are those that can be expanded while the system is running and mounted. For example:

      http://support.citrix.com/article/CTX125405


    quinta-feira, 29 de outubro de 2015

    Klmover–Kaspersky utility for changing Network agent settings

     

    The utility is started via command prompt and has the following syntaxis:

    klmover [-logfile LOGFILE] [-address SERVER_ADDRESS] [-pn NON_SSL_PORT] [-ps SSL_PORT] [-nossl] [-cert CERTIFICATE] [-silent] [- dupfix]

    For example:

    klmover -address 172.16.1.1 -logfile klmover.log

    • -logfile LOGFILE  - create a utility run log. By default, the information will be stored in the stdout.tx file; if run without this switch, error messages will be displayed on the screen;
    • -address SERVER_ADDRESS  - new Administration server name. Can contain IP address, NetBIOS or DNS name;
    • -pn NON_SSL_PORT - indicates to Network agent an Administration server port for establishing a non-secure connection. This switch is optional; the default port is 14000;
    • -ps SSL_PORT  - indicates to Network agent an Administration server port for establishing a secure connection. This switch is optional; the default port is 13000;
    • -nossl - connect to Administration server using a non-secure connection, Without this switch, Network agent will connect to Administration server using the secure SSL protocol.
    • -cert CERTIFICATE  - new Administration server certificate file path. This switch is optional;
    • -silent  - silent mode.
    • -dupfix - this switch is obligatory if you installed Network agent by some alternative method (e.g. restore from a system image) instead of using a distribution package.

    quarta-feira, 28 de outubro de 2015

    Nslookup – Common Usage Examples

     

    https://blog.thesysadmins.co.uk/nslookup-common-usage-examples.html

    Some Useful Office 365 PowerShell commands

     

    1. Set Password never expired

    Set Password never expired for Office 365 user

    PowerShell command Syntax

    • PowerShell

      Set-msoluser –UserPrincipalName <UserPrincipalName> -PasswordNeverExpires $True


    PowerShell command Example

    • PowerShell

      Set-MsolUser –UserPrincipalName John@o365info.com -PasswordNeverExpires $True
      Disable Password never expired option for a Office 365 user

    PowerShell command Syntax

    • PowerShell

      Set-MsolUser –UserPrincipalName <UserPrincipalName>  -PasswordNeverExpires $False


    PowerShell command Example

    • PowerShell

      Set-MsolUser -UserPrincipalName John@o365info.com -PasswordNeverExpires $False
      Set Password never expired for ALL Office 365 users (Bulk Mode)

    PowerShell command Syntax

    • PowerShell

      Get-MsolUser | Set-MsolUser –PasswordNeverExpires $True
      Re-enable Password expired ( the default) for ALL Office 365 users (Bulk Mode)

    PowerShell command Syntax

    • PowerShell

      Get-MsolUser | Set-MsolUser –PasswordNeverExpires $False

    2. Set Password

    Set a Predefined Password for Office 365 user

    PowerShell command Syntax

    • PowerShell

      Set-MsolUserPassword –UserPrincipalName <UserPrincipalName> –NewPassword <New Password> -ForceChangePassword $False


    PowerShell command Example

    • PowerShell

      Set-MsolUserPassword -UserPrincipalName John@o365info.com -NewPassword ww#322x -ForceChangePassword $False
      Set a Predefined Password for all Office 365 users (Bulk mode)

    PowerShell command Syntax

    • PowerShell

      Get-MsolUser |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword <password> -ForceChangePassword $False}

    PowerShell command Example

    • PowerShell

      Get-MsolUser |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword Abc#45 -ForceChangePassword $False}
      Set a Predefined Password for Office 365 users imported from a CSV File

    Step 1: Export Office 365 users account


    PowerShell command Syntax

    • PowerShell

      Get-MsolUser | Select UserPrincipalName| Export-CSV
      Step 2:

    Set a Predefined Password

    • PowerShell

      Import-CSV  |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword <Password>  -ForceChangePassword $False}
      Example: Step 1: Export Office 365 users account

    Predefined Password-CSV

    PowerShell command Example

    • PowerShell

      Get-MsolUser | Select UserPrincipalName|Export-CSV C:\Temp\o365users.csv
      PowerShell

      Import-CSV C:\Temp\o365users.csv |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword AbcAs123 -ForceChangePassword $False}


    Create new Office 365 user and set a unique temporary password by import the information from CSV file

    temp password

    You can download a sample CSV file – Password.csv
    PowerShell command Example

    • PowerShell

      Import-CSV –Path C:\Temp\users.csv| ForEach-Object { New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.FirstName -LastName $_.LastName  -DisplayName "$($_.FirstName) $($_.LastName)" –Password $_.Password –UsageLocation “US” }

    Provisioning Office 365 user and export information from Active Directory

    In case that you need to export Active Directory on-Premise user account based on a specific parameter, you can use the PowerShell cmdlets named – get-aduser (you will need to use PowerShell console from DC or import the Active Directory cmdlets to the existing PowerShell console


    For example:

    Example 1 – display or export, all of the Active Directory users that are located in a specific OU.

    In our specific scenario, the domain name is – o365info.com and the specific OU is – Test

    Display information about – all of the Active Directory users that are located in a specific OU

    PowerShell command Example

    • PowerShell

      Get-ADUser -LDAPfilter '(name=*)' -searchBase {OU=test,DC=o365info,dc=local}

    Export to a CSV file information about – all of the Active Directory users that are located in a specific OU + choose a specific data fields.

    • PowerShell

      $usersfromOU = Get-ADUser -LDAPfilter '(name=*)' -searchBase {OU=test,DC=o365info,dc=local}
      $usersfromOU | export-csv C:\usersbyOU.csv
      Example 2 – display + export information about Active Directory users from a specific department.

    The PowerShell command syntax is:

    • PowerShell

      $Users = Get-AdUser -filter "department -eq '<name>'"

    An example to a scenario in which we want to export information only about Active Directory users that belong to the marketing department could be

    • PowerShell

      $aduserdep = Get-AdUser -filter "department -eq 'marketing'" -Properties City,Title,Department,GivenName,Surname
    • PowerShell

      $aduserdep | export-csv c:\aduserdep.csv
      Set a Temporary Password for a specific user

    PowerShell command Syntax

    • PowerShell

      Set-MsolUserPassword –UserPrincipalName  <UserPrincipalName> –NewPassword <New Password>-ForceChangePassword $True

    PowerShell command Example

    • PowerShell

      Set-MsolUserPassword -UserPrincipalName John@o365info.com -NewPassword ww@322x -ForceChangePassword $True

    Set a Temporary Password for all Office 365 users (Bulk Mode)

    PowerShell command Syntax

    • PowerShell

      Get-MsolUser | Set-MsolUserPassword –NewPassword <New Password> -ForceChangePassword $False

    PowerShell command Example

    • PowerShell

      Get-MsolUser | Set-MsolUserPassword -NewPassword ww#322x -ForceChangePassword $False

    3. Office 365 Password Policy

    PowerShell command Syntax

    • PowerShell
      Set-MsolPasswordPolicy -DomainName  <Domain Name> -NotificationDays <Number Of Days> –ValidityPeriod <Number Of Days>

    PowerShell command Example

    • PowerShell

      Set-MsolPasswordPolicy -DomainName o365info.com -NotificationDays 15 -ValidityPeriod 180

    4. Display Password settings

    Display Password settings for all Office 365 users

    PowerShell command Syntax

    • PowerShell

      Get-MsolUser | Select UserPrincipalName,PasswordNeverExpires

    Display information about Office 365 Password Policy

    PowerShell command Syntax

    • PowerShell

      Get-MsolPasswordPolicy –DomainName <Domain Name>

    PowerShell command Example

    • PowerShell

      Get-MsolPasswordPolicy –DomainName  o365info.com

    Connect to Office 365 Cloud Services using PowerShell

    You can use the following versions of Windows:
    • Windows 8 or Windows 8.1
    • Windows Server 2012 or Windows Server 2012 R2
    • Windows 7 Service Pack 1 (SP1)*
    • Windows Server 2008 R2 SP1*
    * You need to install the Microsoft .NET Framework 4.5 or 4.5.1 and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see Installing the .NET Framework 4.5, 4.5.1 and Windows Management Framework 3.0 or Windows Management Framework 4.0.

    You need to install the modules that are required for Office 365, SharePoint Online, and Skype for Business Online:

    • Microsoft Online Service Sign-in Assistant for IT Professionals RTW
    • Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
    • SharePoint Online Management Shell
    • Windows PowerShell Module for Lync Online (Skype for Business Online)


    Connect to Exchange Online

    On your local computer, open Windows PowerShell and run the following command.

    • $UserCredential = Get-Credential

    In the Windows PowerShell Credential Request dialog box, type your Exchange Online user name and password, and then click OK.


    • Run the following command.


    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection


    Run the following command.



    • Import-PSSession $Session


    If you get and error like "Import-PSSession : Files cannot be loaded because running scripts is disabled on this system. P", run this: 



    • Set-ExecutionPolicy Unrestricted
    and then again: 

    • Import-PSSession $Session
    When done: Remove-PSSession $Session to clear the session

    Clear Exchange logs when backup software is not

     

    diskshadow
    add volume d: (or your Exchange drive)
    begin backup
    create
    end backup

    Change the low resolution (1024x600) 10” screens


    This only works on Windows 7/8 and 10 equipped netbooks.
    Here’s what you have to do:
    1) Run regedit
    1a) If you are not on higest tree level, go to him (by click on “Computer” from key tree)
    2) Search and modify all values “Display1_DownScalingSupported” from “0” to “1”
    3) Restart the system
    4) Enjoy the two new resolutions: 1024×768 px and 1152×864 px

    Generate new passwords

     

    In case you need to generate a lot of passwords:

    http://www.ibeast.com/content/tools/PasswordGenerate/

    terça-feira, 27 de outubro de 2015

    Acrobat/Reader: Z@xxx.tmp files left behind in Temp folder after printing

     

    Issue

    If you are printing files with Adobe Reader/Acrobat you may notice that some tmp files are created in your Windows Temp folder:

    C:\Documents and Settings\<user>\Local Settings\Temp

    with file names similar to:

    Z@R3A.tmp

    Z@R3C.tmp

    Z@R3E.tmp

    Z@R38.tmp

    Z@R3B.tmp

    http://blogs.adobe.com/dmcmahon/2011/11/08/acrobatreader-tmp-files-left-behind-in-temp-folder-after-printing/

    terça-feira, 20 de outubro de 2015

    Windows Filtering Platform Audit Noise

     

    To many Security events from Windows Filtering Platform???

    Try this:

    computer configuration –> policies –> windows settings –> security settings –> advanced audit policy configuration –> audit policies –> object access. Then double-click “Audit Filtering Platform Connection” and check only the box next to “configure the following audit events.” DO NOT CLICK THE OTHER TWO BOXES. Repeat for “Audit Filtering Platform Packet Drop”

    https://networksavy.wordpress.com/2011/05/11/windows-filtering-platform-audit-noise/

    quinta-feira, 15 de outubro de 2015

    The Mega Tool - Sysinternals Suite

     

    https://technet.microsoft.com/en-gb/sysinternals/bb842062

    From their website:

    Introduction

    The Sysinternals Troubleshooting Utilities have been rolled up into a single Suite of tools. This file contains the individual troubleshooting tools and help files. It does not contain non-troubleshooting tools like the BSOD Screen Saver or NotMyFault.

    The Suite is a bundling of the following selected Sysinternals Utilities:

    AccessChk

    AccessEnum

    AdExplorer

    AdInsight

    AdRestore

    Autologon

    Autoruns

    BgInfo

    CacheSet

    ClockRes

    Contig

    Coreinfo

    Ctrl2Cap

    DebugView

    Desktops

    Disk2vhd

    DiskExt

    DiskMon

    DiskView

    Disk Usage (DU)

    EFSDump

    FindLinks

    Handle

    Hex2dec

    Junction

    LDMDump

    ListDLLs

    LiveKd

    LoadOrder

    LogonSessions

    MoveFile

    NTFSInfo

    PendMoves

    PipeList

    PortMon

    ProcDump

    Process Explorer

    Process Monitor

    PsExec

    PsFile

    PsGetSid

    PsInfo

    PsPing

    PsKill

    PsList

    PsLoggedOn

    PsLogList

    PsPasswd

    PsService

    PsShutdown

    PsSuspend

    RAMMap

    RegDelNull

    Registry Usage (RU)

    RegJump

    SDelete

    ShareEnum

    ShellRunas

    Sigcheck

    Streams

    Strings

    Sync

    Sysmon

    TCPView

    VMMap

    VolumeID

    WhoIs

    WinObj

    ZoomIt

    Shared calendar in Public Folder (Office 365)


    http://windowsitpro.com/office-365/public-folders-office-365-exchange-online-new-beginning
    Important to check:

    Exchange Online Limits

    https://technet.microsoft.com/en-us/library/exchange-online-limits.aspx

    See what is really starting with your windows machine

     

    Best tool out there and it’s free:

    https://technet.microsoft.com/en-gb/sysinternals/bb963902.aspx

    (from their website)
    Introduction

    This utility, which has the most comprehensive knowledge of auto-starting locations of any startup monitor, shows you what programs are configured to run during system bootup or login, and when you start various built-in Windows applications like Internet Explorer, Explorer and media players. These programs and drivers include ones in your startup folder, Run, RunOnce, and other Registry keys. Autoruns reports Explorer shell extensions, toolbars, browser helper objects, Winlogon notifications, auto-start services, and much more. Autoruns goes way beyond other autostart utilities.

    Autoruns' Hide Signed Microsoft Entries option helps you to zoom in on third-party auto-starting images that have been added to your system and it has support for looking at the auto-starting images configured for other accounts configured on a system. Also included in the download package is a command-line equivalent that can output in CSV format, Autorunsc.

    You'll probably be surprised at how many executables are launched automatically!

    Activate Windows 10 with W7/8/8.1 keys

     

    The latest preview release of Windows 10 includes the first glimpse of a new feature designed to eliminate one specific activation headache. When this change rolls out to the general public next month, you'll be able to use your Windows 7, 8, or 8.1 product key to complete a Windows 10 upgrade.

    see more in:

    http://www.zdnet.com/article/next-big-windows-10-release-will-ease-activation-hassles/?tag=nl.e541&s_cid=e541&ttag=e541&ftag=TRE7ce1dc9

    Exchange 2013 multi tenant


    Some useful links:
    https://technet.microsoft.com/en-us/office/dn756468.aspx
    https://technet.microsoft.com/en-us/library/jj862352(v=exchg.150).aspx
    Step-by-step guide:
    https://www.geekandi.com/2013/08/02/exchange-2013-multi-tenancy-step-by-step/