Follow by Email

Sunday, 5 March 2017

APNs Certificate already Expired if Renew and Upload to SCCM Hybrid mode, Any Impacts to existing users?

Background: We use Office 365 and EMS E3 with Intune subscription integrated with SCCM 2012 (Hybrid). The certificate had been expired for 5 days, which prevented devices from enrolling and I worry is there is any impact on my existing IOS Devices ,do I need to re-enroled all the ios devices ?
  1. If I  using existing apple ID and renew APNs. Will I still need to re-enrolled all the ios devices?  
  2. If yes, request re-enrolled all devices what is the user experience look like?  Will Apple IOS Devices Getting error or prompt for notifications from company Portal?  I’m doing research and found technet link at below, From Technet and Mvp answered is require Re-enrolled for All IOS Devices.
Refer to TechNet and links below:-
https://blogs.technet.microsoft.com/enterprisemobility/2015/10/06/new-apns-certificate-expiration-alert/

https://www.enhansoft.com/blog/configmgr-and-apple-push-notification-apn-certificate-renewal

http://gerryhampsoncm.blogspot.my/2015/11/microsoft-intune-renew-apple-apn.html?m=1
  1. But, I found in Technet Forum, one of the guys DanielK8507, he said after renewing and uploading the certificate with the same apple id, I will not need to re-enroll all the IOS devices. Now I really confuse. seeking help if anyone have experience this before and I need the answer .Thanks.

Saturday, 26 November 2016

The Best Blog for Wsus and SCCM SUP Maintenance

The complete guide to Microsoft WSUS and Configuration Manager SUP maintenance

Sources from :- https://blogs.technet.microsoft.com/configurationmgr/2016/01/26/the-complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maintenance/

~ Meghan Stewart | Support Escalation Engineer

I’ve recently seen a lot of questions about Windows Server Update Services (WSUS) maintenance for Configuration Manager environments so I wanted to take a minute and hopefully address some of them here. Usually the questions are along the lines of “How should I properly run this in a Configuration Manager environment?”, or “How often should I be running this maintenance?” I have also seen extremely conscientious Configuration Manager administrators be completely unaware that WSUS maintenance should be run at all. After all, most of us just setup WSUS servers since it is a prerequisite for a Software Update Point (SUP). Once the SUP is setup, we close the WSUS console and pretend it doesn’t exist anymore. Unfortunately, this can be problematic for our Configuration Manager clients and the overall performance of the WSUS/SUP server.

So with the understanding that this maintenance needs to be done, I bet you’re wondering what maintenance you need to do and how often you need to be doing it. The answer is you should be doing this maintenance monthly and I’ll show you how below. Running the proper maintenance is pretty easy and doesn’t take very long for WSUS machines that have been well maintained from the beginning, however be aware that if you have never run WSUS maintenance before and the WSUS computer has been in production for a while, the cleanup may be harder the first time you run it, but will be much faster in the subsequent months.

Important Considerations

Before we get started, it’s important that I mention a few things:

  1. You should read all of the instructions before starting this process, as you may realize that you need to do steps in the middle of the article before you are able to go through the process from the start of the article to the end.

  2. Remember that when doing WSUS maintenance when you have downstream servers, you add to the WSUS servers from the top down, but remove from the bottom up. So if you are syncing/adding updates, they flow into the top (upstream WSUS server) then replicate down to the downstream servers. When you do a cleanup, you are removing things from the WSUS servers, so you should remove from the bottom of the hierarchy and allow the changes to flow up to the top.

  3. It’s important to note that this WSUS maintenance can be performed simultaneously on multiple servers in the same tier. You do however want to make sure that one tier is done before moving onto the next one when doing a cleanup. The cleanup and re-index steps I talk about below should be run on all WSUS servers regardless of whether they are a replica WSUS server or not (see section 4 below for how to determine if the WSUS is a replica).

  4. This is a big one. You must ensure that you do not sync your SUPs during this maintenance process as it is possible you will lose some of the work you have already done if you do. You may want to check your SUP sync schedule and set it to manual during this process.

  5. Note that If you have multiple SUPs off the primary site or CAS that do not share the SUSDB, consider the WSUS that syncs with the first SUP on the site as residing in a tier below the site. For example, my CAS site has 2 SUPs. The one named “New” syncs with Microsoft update. This would be my top tier (Tier1). The server named “2012” syncs with “New” and it would be considered in the second tier and can be cleaned up at the same time I would do all my other Tier2 servers, such as my primary site’s single SUP.

1

How to run WSUS maintenance

The four basic steps necessary for proper WSUS maintenance include the following:

  1. Backup the WSUS database
  2. Run the WSUS Server Cleanup Wizard
  3. Re-index the WSUS database
  4. Decline superseded updates

I go through each of these below.

1. Backup your WSUS database

Backup your WSUS database (SUSDB) using whichever method is your favorite.

2. Run the WSUS Server Cleanup Wizard

The WSUS Server Cleanup Wizard can be launched from the console. It is located under Options as shown here:

2

NOTE If you have not done maintenance before, run step 3, then 2, then 3 again. The initial re-index will help the cleanup go faster.

Please be aware that if the WSUS Server Cleanup Wizard has never been run and the WSUS has been in production for a while, the cleanup may time out. In that case, re-index with Steps 2 and 3 first, then run the cleanup with only the top box checked (unused updates and updates revisions). This may require a few passes. If it times out, run it again until it completes, then run each of the other options one at a time. Lastly make a “full pass” with all options checked. See the following TechNet documentation for more information:

Use the Server Cleanup Wizard

3

The cleanup is finished once it actually reports the number of items it has removed. If you do not see this returned on your WSUS server, it is safe to assume that the cleanup timed out and you will need to start it again.

4

3. Re-index the WSUS database

After the cleanup is finished, you need to re-index the WSUS database (SUSDB) with the following script:

http://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61

The steps to run the script are different depending on whether you installed SUSDB on SQL Server or on Windows Internal Database (WID). This was specified when you actually installed SUSDB. If you are not sure which you used, you can check a registry key on the WSUS server located at HKLM\Software\Microsoft\Update Services\Server\Setup to verify. Look for the SQLServerName value. If you see just a server name or server\instance, you are using SQL server. If you see something that has the string ##SSEE or ##WID in it, you installed on Windows Internal Database, as demonstrated below:

clip_image008

clip_image009

If you installed SUSDB on Windows Internal Database

If you installed SUSDB on Windows Internal Database (WID) you will need to install SQL Management Studio Express in order to run the re-index script. If you’re not sure which version of SQL Server Management Studio Express to install, here’s an easy way to figure that out:

  • For Windows Server 2012, go to C:\Windows\WID\Log and find the error log that has the version number you’re using. Lookup the version number here:

321185 – How to determine the version, edition and update level of SQL Server and its components (https://support.microsoft.com/en-us/kb/321185)

This will tell you what Service Pack level it is running. Include the SP level when searching the Download Center for SQL Management Studio Express as sometimes it does matter.

  • For Windows Server 2008 R2 or below, go to C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\LOG and open up the last error log with Notepad. At the very top there will be a version number (e.g. 9.00.4035.00 x64). Lookup the version number here:

321185 – How to determine the version, edition and update level of SQL Server and its components (https://support.microsoft.com/en-us/kb/321185)

This will tell you what Service Pack level it is running. Include the SP level when searching the Download Center for SQL Management Studio Express.

Once SQL Management Studio Express is installed, launch it and it will prompt you to enter the server name to connect to:

  • If your OS is Windows Server 2012, use \\.\pipe\MICROSOFT##WID\tsql\query
  • If you are not running Windows Server 2012, enter \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

NOTE For WID, you may want to run SQL Server Management Studio Express as administrator if you were not the person who installed WSUS.

TIP Alternatively, you can also use a utility called sqlcmd to run the script if it is installed. See the following TechNet documentation for more information:

Reindex the WSUS Database

If you installed SUSDB on SQL Server

If you installed on full SQL Server, simply launch SQL Server Management Studio and enter the name of the server (and instance if needed) when prompted.

Running the script

To run the script in either SQL Server Management Studio or SQL Server Management Studio Express, click on the New Query button, paste the script in the window and then click Execute. When it is finished you will see Query executed successfully along with the messages of what indexes were rebuilt.

5

6

4. Decline superseded updates

Additionally, you may want to decline superseded updates in the WSUS server so it helps your clients scan more efficiently. Before declining updates, you should ensure that the superseding updates are deployed and that you no longer need the superseded ones. Configuration Manager does have a separate cleanup where it expires updates that are superseded based on criteria that you provide it. For more information about this setting, review the Supersedence Rules heading at these links:

You can do this manually in WSUS if you wish, or you can run this PowerShell script. Simply download the script and rename it with a .PS1 extension. Please note that I am providing this script “as is” and it should be fully tested in a lab before being used in production. Microsoft makes no guarantees regarding the use of script in any way.

NOTE You always want to run the script with the –SkipDecline parameter before running the decline so you get a summary of how many superseded updates you are about to decline.

I normally recommend to run the script on the WSUS servers if you choose to expire superseded updates immediately in Configuration Manager. I run this once a quarter in my environment. This should be done on all autonomous WSUS servers in the Configuration Manager/WSUS hierarchy. This does not need to be run on WSUS servers set as replica such as Secondary Site SUPs. If you are unsure, verify the setting on your WSUS.

7

If you do not expire updates immediately in Configuration Manager, you will need to set an exclusion period that matches your Configuration Manager setting for number of days to expire superseded updates. In this case, it would be 60 days since I specified to wait 2 months in my SUP properties.

8

Examples on how to run the script using PowerShell running as administrator:

Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -Port 80 -SkipDecline

Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -UseSSL -Port 8351

Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -Port 8530

Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -Port 8530 –ExclusionPeriod 60

Running the script with a –SkipDecline and –ExclusionPeriod 60 to gather information about my WSUS and how many updates I will decline:

9

Running the script with –ExclusionPeriod 60:

10

Running the script to decline the rest of the superseded updates:

11

Troubleshooting
What if I find out I needed one of those updates I declined?

If you decide you need one of these declined updates in Configuration Manager for some reason, you can get it back in WSUS by right-clicking on the update and selecting Approve. Change the approval to Not Approved and resync your SUP to get the update back in.

12

If the update is no longer in your WSUS, you can import it from the Microsoft Update Catalog as long as it has not been expired from the catalog.

13

HELP! My WSUS has been running for years without ever having maintenance done and the cleanup wizard keeps timing out.

There are really two different options you can take here:

1. Reinstall WSUS with a fresh database.

2. Ensure you have a backup of the SUSDB then run a re-index. When that completes, run the following stored procedure in SQL Server Management Studio or SQL Server Management Studio Express. After this finishes, follow all of the above instructions for running maintenance. This last step is necessary because the stored procedure here only removes unused updates and update revisions.

DECLARE @var1 INT

DECLARE @msg nvarchar(100)

CREATE TABLE #results (Col1 INT)

INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup

DECLARE WC Cursor

FOR

SELECT Col1 FROM #results

OPEN WC

FETCH NEXT FROM WC

INTO @var1

WHILE (@@FETCH_STATUS > -1)

BEGIN SET @msg = ‘Deleting’ + CONVERT(varchar(10), @var1)

RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1

FETCH NEXT FROM WC INTO @var1 END

CLOSE WC

DEALLOCATE WC

DROP TABLE #results


Automating WSUS maintenance

I’m often asked whether these WSUS maintenance tasks can be automated, and the answer is yes, assuming that a few requirements are met first.

1. If you have never run WSUS cleanup, you need to do the first two cleanups manually. Your second manual cleanup should be run 30 days from your first since it takes 30 days for some updates and update revisions to “age out”. There are specific reasons for why you don’t want to automate until after your second cleanup. Your first cleanup will probably run longer than normal so you can’t judge how long this maintenance will normally take, whereas the second cleanup is a much better indicator of what is normal for your machines. This is important because you need to figure out about how long each step takes as a baseline (I also like to add about 30 minutes “wiggle room”) so that you can determine the timing for your schedule.

2. If you have downstream WSUS servers, you will need to run them first, then do the upstream servers.

3. To schedule the re-index of the SUSDB you will need a full version of SQL Server. Windows Internal Database (WID) does not have the capability of scheduling out a maintenance task though SQL Server Management Studio Express. With that said, in cases where WID is used you can use the Task Scheduler with SQLCMD mentioned earlier. If you go this route, it’s important that you DO NOT SYNC YOUR WSUS SERVERS/SUPs during this maintenance period! If you do, it is very possible your downstream servers will just end up resyncing all of the updates you just attempted to clean out. Personally, I schedule this overnight before my AM sync so I have time to check on it before my sync runs.

Links you will need and some you may possibly need:

Setting up the WSUS Cleanup Task in Task Scheduler

The easiest basic directions and troubleshooting for this step are here but I’ll walk you through the process below.

1. Open Task Scheduler and Select Create a Task. Under the General tab, set the name of the task, the user that you want to run the PowerShell script as (most people use a service account), select Run whether a user is logged on or not, then add a description if you wish.

21

2. Under the Actions tab, add a new action and specify the program/script you want to run. In this case we need to use PowerShell and point it to the PS1 file we want it to run. I use the script found here. If you would like a log, you can append the last line of the script to read:

$cleanupManager.PerformCleanup($cleanupScope)| Out-File c:\wsus\wsusclean.txt

Note that you will get an FYI/warning in Task Scheduler when you save, but this is OK and can be ignored.

22

3. Set your schedule under the Triggers tab for once a month on any schedule you wish. Again, you must ensure that you do not sync your WSUS during the entire cleanup and re-index time. This statement really is important enough for me to bold it three times in a single article.

23

4. Set any other conditions or settings you would like to tweak as well. Note that when you save the task, you may be prompted for credentials of the “run as” user.

5. You can also use these steps to configure the Decline-SupersededUpdates.ps1 script to run every 3 months. I usually set this to run before the other cleanup steps, but only after I have run it manually and ensured it completed successfully. I run at 12:00 AM on the 1st Sunday every 3 months.

Setting up the SUSDB re-index for WID using SQLCMD & Task Scheduler

1. Save the script here as a .sql file (e.g. SUSDBMaint.sql)

2. Create a basic task and give it a name:

24

3. Schedule this task to start about 30 minutes after you expect your cleanup to finish running. My cleanup is running at 1:00 AM every first Sunday. It takes about 30 minutes to run and I am going to give it an additional 30 minutes before starting my re-index. This means I would schedule this task for every 1st Sunday at 2:00 AM, as shown here:

25

4. Select the action to Start a program. In the Program/script box type the following, where the file specified after the –i parameter is the path to the SQL script you saved in step 1, and the file specified after the –o parameter is where you would like the log to be placed. Here’s an example of what that might look like:

“C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.exe” -S \\.\pipe\Microsoft##WID\tsql\query -i C:\WSUS\SUSDBMaint.sql -o c:\WSUS\reindexout.txt

26

5. You will get a warning, similar to the one you got when creating the cleanup task. Click Yes to accept the arguments, then click Finish to apply.

clip_image041

6. You can test the script by forcing it to run and reviewing the log for errors. If you run into issues, the log will tell you why. Usually if it fails, the account running the task does not have appropriate permissions or the WID service is not started.

Setting up a basic Scheduled Maintenance Task in SQL for non-WID SUSDBs

NOTE You must be a sysadmin in SQL to create or manage Maintenance Plans.

1. Open SQL Server Management Studio and connect to your WSUS instance. Expand Management, then right-click on Maintenance Plans and select New Maintenance Plan. Give your plan a name.

image

2. Click on subplan1 and then ensure your Toolbox is in context:

clip_image044

3. Drag and drop the task Execute T-SQL Statement Task:

clip_image046

4. Right-click on it and select Edit. Copy and paste the WSUS re-index script and click OK:

image

5. Schedule this task to run about 30 minutes after you expect your cleanup to finish running. My cleanup is running at 1:00 AM every first Sunday. It takes about 30 minutes to run and I am going to give it an additional 30 minutes before starting my re-index. This means I would schedule this task to run every 1st Sunday at 2:00 AM.

image

6. While you are creating the maintenance plan, you may want to consider adding a backup of the SUSDB into your plan as well. I usually backup first, then re-index. Note this may add additional time to your schedule.

Putting it all together

When running this in a hierarchy, you want the WSUS cleanup run from the bottom of the hierarchy up, but you want the decline script to run from the top down.

Since I can’t sync during the actual cleanup, I would prefer to be able to complete all tasks overnight then check on their completion via the logging when I come into the office in the morning before my next sync is scheduled. This is because in the case that something failed, I can reschedule the maintenance for the next night once I identify what failed and resolve the issue.

These tasks may run faster or slower in your environment and the timing of your schedule should reflect that. Hopefully they are faster since my lab environment tends to be a bit slower than a normal production environment. I am a bit aggressive on the timing of the decline scripts since if Tier2 overlaps Tier3 by a few minutes, it will not cause a problem.

My sync is not scheduled to run. This keeps the declines from accidentally flowing into my Tier3 replica WSUS servers from Tier2. I did give myself extra time between the Tier3 decline and the Tier3 cleanup since I definitely want to make sure the decline script finishes before running my cleanup.

This brings up a common question: Since I am not syncing, why shouldn’t I run all of the cleanups and re-indexes at the same time? The answer is that you probably could, but I wouldn’t. If my coworker across the globe needs to run a sync, with this schedule I would minimize the risk of orphaned updates in WSUS and I can schedule it to rerun to completion the next night:

Time

Tasks

12:00 AM

Tier1-Decline

12:15 AM

Tier2- Decline

12:30 AM

Tier3-Decline

1:00 AM

Tier3 WSUS Cleanup

2:00 AM

Tier3 Re-index

Tier2 WSUS Cleanup

3:00 AM

Tier1- Cleanup

Tier2 Re-index

4:00 AM

Tier1 Re-index

If you’d like more information regarding SUP maintenance in Microsoft Configuration Manager, we also have this KB article:

3090526Software update maintenance in System Center 2012 Configuration Manager (https://support.microsoft.com/en-us/kb/3090526)

How to Repair SUSDB

SUSDB SQL Server cannot run " The transaction log for database 'SUSDB' is full due to 'CHECKPOINT' in SUSDB

2. I tried to do DB backup. Failed. I tried to run DBCC CheckDB failed with below error.

-----------------------------------------------------------------------------------------------------------

3. It seems that we have to rebuild transaction logs for SUSDB. We run below scripts to rebuild

-------------------------------------------------------------------------------------------------------------------------

alter database susdb set emergency

go

alter database susdb set single_user with rollback immediate

go

use master

go

alter database susdb Rebuild Log on

(name=susdb_log,filename='D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\susdb_log2.LDF')

go

4. After rebuilding log file. We should run DBCC CheckDB and repair allow data loss.

---------------------------------------------------------------------------------------------------------

alter database susdb set multi_user with rollback immediate

go

alter database susdb set emergency

go

alter database susdb set single_user with rollback immediate

go

dbcc checkdb('susdb', repair_allow_data_loss)

go

Below is DB repairing results. It seems DB has been repaired.

==================================================

DBCC results for 'SUSDB'.

There are 18757 rows in 41 pages for object "tbBundleAll".

CHECKDB found 0 allocation errors and 0 consistency errors in database 'SUSDB'.

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Monday, 21 November 2016

How to configure load balance between two IIS Web Server

 

Create two VM Machine with the same cloud services

Enable IIS Web Services fo both server

Edit C:\inetpub\wwwroot\iistart.html

Add in <H1>Connected to VM:Web Server 1</H1> for both server according to the name for testing.

clip_image002

For Web Server 1 VM Configure at below

Add Endpoint to a virtual machine and select ADD A STAND-ALONE ENDPOINT

clip_image004

clip_image006

Under name key in WEB, Protocol: TCP, PUBLIC PORT: 8080 and PRIVATE PORT: 80.

Make sure you check box on create a load-balanced set.

clip_image008

Configure Probe Interval =5 seconds and number of probes = 2

Number of probes = number of times I miss it.

For Web Server 2 configure at below

clip_image010

clip_image012

Key in Name and finish the configuration.

Now back to your computer and test the url from your browser

http://coffeeeuropehq.cloudapp.net:8080/

clip_image014

How to Deploy Office 365 via SCCM 2012/1511/1606

Kindly take note before you start the Office 365 deployment.

· You can't mix 64-bit and 32-bit versions of Office and will have to choose one or the other.

· You can mix versions such as Office 2010 and either Office 2013 or Office 2016 as long as both are either 32-bit or 64-bit.

· To switch from 32-bit to 64-bit, you'll have to uninstall the 32-bit version and then install the 64-bit version. Likewise, to switch from 64-bit to 32-bit, you’ll need to uninstall the 64-bit version and then install the 32-bit version.

Sources from :- https://support.office.com/en-US/client/results?Shownav=true&lcid=1033&ns=OCSAC2RClickToRun&version=16&omkt=en-US&ver=16&helpid=%225-BOOTSTRAPPER_PREREQ-SxS_32_over_64%22&app=webviewABE27C04-8E33-42CC-861A-F0F694C830B6

Version and build numbers of update channel releases for Office 365 clients

https://technet.microsoft.com/en-us/library/mt592918.aspx

Understanding of O365 Updates

https://technet.microsoft.com/en-us/library/mt455210.aspx

Update channel

Primary purpose

How often updated with new features

Default update channel for the following products

Current Channel

Provide users with the newest features of Office as soon as they're available.

Monthly

Visio Pro for Office 365

Project Online Desktop Client

Office 365 Business, which is the version of Office that comes with some Office 365 plans, such as Business Premium.

Deferred Channel

Provide users with new features of Office only a few times a year.

Every four months

Office 365 ProPlus

First Release for Deferred Channel

Provide pilot users and application compatibility testers the opportunity to test the next Deferred Channel.

Every four months

None

Update channel

Feature updates

Security updates

Non-security updates

Current Channel

Monthly

Monthly

Monthly

Deferred Channel

Every four months

Monthly

Every four months

First Release for Deferred Channel

Every four months

Monthly

Monthly

Configure the update channel to be used by Office 365 ProPlus

Deferred Channel is the default update channel for Office 365 ProPlus. But you can configure an Office 365 ProPlus installation to use Current Channel or First Release for Deferred Channel. Also, not all users in your organization have to be configured the same. For example, you might do the following:

  • Provide a group of pilot users with Current Channel, so they can try out the new features of Office as they become available.
  • Provide your finance department, which has several key line-of-business applications, with Deferred Channel.
  • Provide your application compatibility testers with First Release for Deferred Channel so that they can test that the finance applications will work with the next Deferred Channel release.

To configure the update channel for an Office 365 ProPlus installation, you can use the latest version of the Office Deployment Tool or use the Group Policy Administrative Templates files (ADMX/ADML) for Office 2016.

Enable Office 365 Client Management via Group Policy

If you use the Office Deployment Tool, you can use the Channel attribute in the configuration.xml file. The Channel attribute can be specified in the Add element or the Update element. The relevant values are Current, Deferred, and FirstReleaseDeferred. For example, if you want to download and install the Current Channel of Office 365 ProPlus, your configuration.xml file would look like the following example.

<Configuration>

<Add SourcePath="\\server01\office" OfficeClientEdition="32" Channel="Current">

<Product ID="O365ProPlusRetail" >

<Language ID="en-us" />

</Product>

</Add>

</Configuration>

The name of the Group Policy setting is Update Channel. You can find this policy setting under Computer Configuration\Administrative Templates\Microsoft Office 2016 (Machine)\Updates. The relevant choices when you enable the Group Policy setting are Current, Deferred, and FirstReleaseDeferred.

You can also provide users with First Release for Deferred Channel by selecting them for the First Release program for Office 365. If you do this, those users can install First Release for Deferred Channel directly from the Software page in the Office 365 portal.

Downloads O365 Installers from Cloud

Requirement

1.Download.xml ( To Download Office 365)

2.Configuration.xml (To Install Office 365 with customization configuration files)

3.Uninstall.xml (To Uninstall Office 365)

4.Setup.exe (To Execute the xml file either download or install)

Create two folders at below :-

1) O365x86

2) O365x64

Download the Office 2016 Deployment Tool and extract to two folders.

Office 2016 Deployment Tools url :-

https://www.microsoft.com/en-us/download/details.aspx?id=49117

Creating Download.xml files for download office 365

Copy and paste to notepad and save as DownO365x86.xml for download the office 365 32 bits version. Save it to the o365x86 folders.

For 32bit Office

<Configuration>

<Add OfficeClientEdition="32">

<Product ID="O365ProPlusRetail">

<Language ID="en-us" />

</Product>

</Add>

</Configuration>

Copy and paste to notepad and save as DownO365x64.xml for download the office 365 64 bits version. Save it to the o365x64 folders.

For 64bit Office

<Configuration>

<Add OfficeClientEdition="64">

<Product ID="O365ProPlusRetail">

<Language ID="en-us" />

</Product>

</Add>

</Configuration>

Copy and Paste to notepad and save as Updatesource0365.bat to run for download the Latest O365 installer

For 32 bit and save it to o365x86 folders

@Echo OFF

Set here=%~dp0%

 

ECHO Creating Dumming Files before running Setup for Office 2016 ...

Pushd %here%

if not exist " Office" md "Office" >nul

if not exist "Office\Data" md "Office\Data" >nul

echo This file will be replaced automatically during first download.>Office\Data\v32.cab

echo This file will be replcaed automatically during first download.>Office\Data\v64.cab

 

ECHO Starting Download of Office 2016 Setup files now....

setup.exe /download downO365x86.xml

popd

For 64 bit and save it to o365x64 folders

@Echo OFF

Set here=%~dp0%

 

ECHO Creating Dumming Files before running Setup for Office 2016 ...

Pushd %here%

if not exist " Office" md "Office" >nul

if not exist "Office\Data" md "Office\Data" >nul

echo This file will be replaced automatically during first download.>Office\Data\v32.cab

echo This file will be replcaed automatically during first download.>Office\Data\v64.cab

 

ECHO Starting Download of Office 2016 Setup files now....

setup.exe /download downO365x64.xml

popd

You can execute the Updatesource0365.bat from O365x86 and O365x64 folders.It will download the O365 Installers.

Optional step :- you can also use Office 365 XML Editor to generate the xml files.

Url:- https://officedev.github.io/Office-IT-Pro-Deployment-Scripts/XmlEditor.html

Preparing the Configuration.xml

Office 365 64BitsConfiguration.xml

Copy and paste to notepad and save as Configuration.xml for install office 365 64 bits version. Save it to the o365x64 folders.

Change those highlighted word accordingly

<Configuration>

<Add OfficeClientEdition="64" Version="16.0.7466.2038">

<Product ID="O365ProPlusRetail">

<Language ID="en-us" />

</Product>

</Add>

<Logging Level="Standard" Path="C:\Windows\Temp" />

<Updates Enabled="True" Branch="Current" UpdatePath="\\SCCM2016\O365Updates"/>

<Display Level="None" AcceptEULA="TRUE" />

<Property Name="AUTOACTIVATE" Value="1" />

<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />

</Configuration>

Office 365 32BitsConfiguration.xml

Copy and paste to notepad and save as Configuration.xml for install office 365 32 bits version. Save it to the o365x86 folders.

Change those highlighted word accordingly

<Configuration>

<Add OfficeClientEdition="32" Version="16.0.7466.2038">

<Product ID="O365ProPlusRetail">

<Language ID="en-us" />

</Product>

</Add>

<Logging Level="Standard" Path="C:\Windows\Temp" />

<Updates Enabled="True" Branch="Current" UpdatePath="\\SCCM2016\O365Updates"/>

<Display Level="None" AcceptEULA="TRUE" />

<Property Name="AUTOACTIVATE" Value="1" />

<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />

</Configuration>

Command line to run setup.exe /configure configuration.xml

Preparing the Uninstall.xml

Office 365 64BitsUninstall.xml

Copy and paste to notepad and save as Uninstall.xml for Uninstall office 365 64 bits version. Save it to the o365x64 folders.

<Configuration>

<Remove All="TRUE" />

<Logging Level="Standard" Path="C:\Windows\Temp" />

<Display Level="None" AcceptEULA="TRUE" />

<Property Name="AUTOACTIVATE" Value="1" />

<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />

</Configuration>

 

Office 365 32BitsUninstall.xml

Copy and paste to notepad and save as Uninstall.xml for Uninstall the office 365 32 bits version. Save it to the o365x86 folders.

<Configuration>

  <Remove All="TRUE" />

  <Logging Level="Standard" Path="C:\Windows\Temp" />

  <Display Level="None" AcceptEULA="TRUE" />

  <Property Name="AUTOACTIVATE" Value="1" />

  <Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />

</Configuration>

Command line to run setup.exe /configure uninstall.xml

Creating O365 Packages for X86 and X64 version

Navigate to Software Library\Overview\Application Management\Applications,

Right Click and Click on Create Application.

Under General tab, Select Manually specify the application information and click on Next.

Under General information tab, Key in the Name Publisher and Version and click on Next.

Click on Browse and point to Setup.exe to getting the office icons and click on Next.

Under Deployment Types tab, Click on Add button and Click on Next.

Under General tab, Select Script Installer and manually and click on Next.

Under General Information tab, Key in the Name and Click on Next.

Under Content tab, Key in the content location Path, Install and Uninstall as below :-

Content location = Office 365 location path.

Installlation Program = setup.exe /configure configuration.xml

Uninstall program = Setup.exe /configure uninstall.xml

Under Detection Method tab and Detection Rule configure as below :-
Setting Type :- File System

For Office 365 x86

Type:- File
Path:- %ProgramFiles (x86)%\Microsoft Office\root\Office16\
File or Folder name : winword.exe
Select the file system setting must satisfy the following rule
Property = Version
Operator = Greater than or equal to (Not using equal because allowing office to be updated)
Value = The version number you downloaded (by the time I’m using 16.0.7466.2038)

For Office 365 x64

Type:- File
Path:- %ProgramFiles%\Microsoft Office\root\Office16\
File or Folder name : winword.exe
Select the file system setting must satisfy the following rule
Property = Version
Operator = Greater than or equal to (Not using equal because allowing office to be updated)
Value = The version number you downloaded (by the time I’m using 16.0.7466.2038)

Under Detection Method tab, click on Next.

Under User Experience tab, follow the setting above and click on Next.

Under Requirements tab, Choose Operating System that support this installers and click on Next.

You are successfully created Office 365 Packages for 32 bits version , please repeat the same steps to create Office 365 packages for 64 bits version.

Distribute content

Don’t Forget to distribute content to the distribution point after finish created the packages.

Deployment

You can create Office 365 collections and target to deploy to those machines.

Scenario :-

I have Windows 7 64 bits system with running on Microsoft Office 2013 x86 version.

For Office 2013 x86 version you must use Office 365 32 bit version .

For office 2013 x64 version , you must use Office 365 64 bits version.

Below are the computers that with office 2013 x86 version installed.

Troubleshooting

You can always check on c:\Windows\Temp , there is the log files that return , why the office fail to install.

Uninstall Office

You can refer to below blogs to uninstall those office version.

http://www.deploymentmadscientist.com/2016/02/08/deploying-microsoft-office-2016-removing-old-versions/

Wednesday, 19 October 2016

How to Query Network Mapped Drive for all remote domain join Computers

 

Download Netscan

https://www.softperfect.com/products/networkscanner/

Open the NetScan and configue the  Remote Wmi  as below :-

clip_image001

After scan  and Results show  as below.

clip_image003

OR Remote WMI Powershell :- Get-WmiObject -Class Win32_MappedLogicalDisk | select Name, ProviderName