Pages

Sunday, July 3, 2016

Uninstall an application from PowerShell–Example Windows Live Essential

I was trying to see an option to uninstall and application from the PowerShell after couple of try I got through.

1. Run PowerShell as administrator

2. Get the status of installation, in this example we are trying to check status of Windows Live Essentials installation so enter as,

“Get-WmiObject -Class win32_product | where { $_.Name -like "*Windows Live Essentials*"}”

clip_image001

3. Store the current installation status to a variable, this example ‘$Software’ is the variable
“$software = Get-WmiObject -Class win32_product | where { $_.Name -like "*Windows Live Essentials*"}”

clip_image002

4. Run “$software.Uninstall()” to un install

clip_image004

5. Execute the step 2 to see the status again

Friday, July 1, 2016

Error while running a PowerShell script with 'curl'

This week I was working on a script to back-up a Audiocodes gateway, while running the script I got below error and it took a day of mine to troubleshooting the issue.

Invoke-WebRequest : Cannot bind parameter 'WebSession'. Cannot convert the "%{http_code}" value of type "System.String" to type "Microsoft.PowerShell.Commands.WebRequestSession".At C:\scripts\Untitled4.ps1:20 char:50+ $statuscode = curl -o null.txt $loginurl -w '%{http_code}'+ ~~~~~~~~~~~~~~+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

clip_image001

Solution which worked for me

After digging lot into the issue came to know that the issue was due to an Alias of ‘curl’

To solve the issue run "Remove-Item alias:curl" from the same PowerShell window or write curl.exe instead of writing just 'curl'

Hope this will help you Winking smile

Sunday, June 26, 2016

Enable Hyper-v feature from PowerShell

As you may probably know Hyper-v comes with Windows 10 as Windows feature and if you would like to enable the same from PowerShell then its possible. You can also enable the feature from graphical way but here I am going to mention how its possible by using PowerShell.

1. Run PowerShell as administrator

2. Type “Get-WindowsOptionalFeature -Online |where featureName -Like "*hyper*" |ft” and hit enter. It will show the current status

image
3. Type “enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -All –Verbose” and hit enter. Enter “Y” when prompted
image

4. Enter “Get-WindowsOptionalFeature -Online |where featureName -Like "*hyper*" |ft” gain to see the status, it should show all enabled
image

Enjoy the Hyper-v feature Smile

Thursday, July 30, 2015

Rest Admin account password of CUCM 7.1

Recently I came across a situation where i had to reset Admin password of CUCM as the CUCM team forgot the password, below are the steps
1. Console into CUCM server
2. Use username 'pwrecovery', password 'pwreset'.
clip_image002
3. Remove a disc into the CD/DVD driven and press any key
clip_image003
4. Insert a CD into the drive and press any key
clip_image005
5. Enter ‘a’ for resetting Admin account password
clip_image007
6. Enter a password for account "admin" and enter the password second time for confirmation.
clip_image009





Tuesday, July 28, 2015

Update SQL Express 2012 with service pack on Lync 2013 server

I have recently come across a situation where I had to upgrade Lync server to Skype for business 2015 and as part of preparing I had to update SQL 2012 express with service pack. Below are the steps for the same.

1. Before starting the update you have to make sure the service is down on the server.
Go to ‘Lync server Management Shell’ and run ‘Stop-Cswindowsservice’
clip_image002

2. Change the location to the install souce location and run caommand ‘.\SQLEXPR_x64_ENU.exe /ACTION=Patch /allinstances /IAcceptSQLServerLicenseTerms’
clip_image003

3. You can see extract is going on...
clip_image005

4. Check ‘I accept the licence terms.’ And click on next to continue.
clip_image007

5. Make sure that all instaces are selected and click on next
clip_image009

6. Click on next to continue
clip_image011

7. Make sure you can see all “success” and click on close
clip_image013

8. Start Lync services and make sure that everything works
clip_image015

Thursday, May 14, 2015

How to enable missing hibernate option in windows 7

 

Issue

Recently I have experienced that ‘Hibernate’ option missing issue on my laptop. I didnt know its an easy task to bring it back Smile 

Solution

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate on, and then press Enter.
    image
  5. Type exit, and then press Enter to close the Command Prompt window.
  6. Now you should see the option

Wednesday, May 13, 2015

Cannot connect to Blogger by using Windows Live Writer

I have recently experienced an issue when trying to post a Blog from Windows Live Writer to my blog on Blogger. It didn’t allow me to authenticate, I was keep getting below message,

clip_image001

Solution:-

Done research and found that Google changed their security policy and it blocks access to the blogger from all external tool like live writer or any other tool which can be used to write blog posts. Google is considering all these tools as “less secure”

Please follow below steps to solve this issue,

1. Open https://www.google.com/settings/security from your browser and authenticate with your account.

2. Go to the section Account permissions and click on Settings against "Access for less secure apps"
  clip_image003

3. Select “Turn on”.

   clip_image005

4. Now try from the live writer it should work Smile

Friday, October 4, 2013

Exchange 2010 Information Store is not getting started and generating event 7024

Description;-

After installation the service is not getting started and when trying to start the service it gives event 7024 in ‘System’. The content of the event is “The Microsoft Exchange Information Store service terminated with service-specific error %%-2147221213.”

image

Solution

Got to command prompt from the Database server where you get this issue and run ‘gpupdate /force’.

Thursday, September 5, 2013

Error while disabling a user from Lync

 

Issue;-

While removing/disabling a user from Lync we got an error ‘Active Directory operation failed on “dc”. You cannot retry this operation:”insufficient access rights to perform the operation. Please refer below screenshot.
image

Solution:-

Solution was so simple even though I took lot of time to find the solution. “Protect object from accidental deletion” was set for the account from AD that is the reason it was not allowing to delete.
clip_image002

From Active Directory users and computer find the user and go to ‘Object’ from properties you can find this settings.

Monday, July 29, 2013

Move Lync 2010 CMS to 2013

Moving CMS to 2013 is very straight one and below are the steps to follow. In the article I also follow how to create replication only for the migrated DBs once the migration is done.

Preparing Lync Server 2013 Front End Servers before moving the Central Management Server

Use the procedures in this section to prepare the Lync Server 2013 Front End Servers before you move the Lync Server 2010 Central Management Server.

To prepare an Enterprise Edition Front End pool

1. On the Lync Server 2013 Enterprise Edition Front End pool where you want to relocate the Central Management Server: Log on to the computer where the Lync Server Management Shell is installed as a member of the RTCUniversalServerAdmins group. You must also have SQL Server database sysadmin user rights and permissions on the database where you want to install the Central Management store.

2. Open the Lync Server Management Shell.

3. To create the new Central Management store in the Lync Server 2013 SQL Server database, in the Lync Server Management Shell, type:

Install-CsDatabase -CentralManagementDatabase -SQLServerFQDN <FQDN of your SQL Server> -SQLInstanceName <name of instance>

Please note that if you are using the default instance then you dont have to mention that. In this example i am using default instance.

image

You may see the installation is going-on. Wait for the run to finish

clip_image004

4. Confirm that the status of the Lync Server Front-End service is started.

 

Move the Lync Server 2010 Central Management Server to Lync Server 2013

 

1.On the Lync Server 2013 server that will be the Central Management Server: Log on to the computer where the Lync Server Management Shell is installed as a member of the RTCUniversalServerAdmins group. You must also have the SQL Server database administrator user rights and permissions.

2.Open Lync Server Management Shell.

3.In the Lync Server Management Shell, type:

Enable-CsTopology

image 
And press enter

Warning:

If Enable-CsTopology is not successful, resolve the problem preventing the command from completing before continuing. If Enable-CsTopology is not successful, the move will fail and it may leave your topology in a state where there is no Central Management store.

4.On the Lync Server 2013 Front End Server or Front End pool, in the Lync Server Management Shell, type:

Move-CsManagementServer

clip_image009

5.Lync Server Management Shell displays the servers, file stores, database stores, and the service connection points of the Current State and the Proposed State. Read the information carefully and confirm that this is the intended source and destination. Type Y to continue.

image

6.Review any warnings or errors generated by the Move-CsManagementServer command and resolve them.

7.On the Lync Server 2013 server, open the Lync Server Deployment Wizard.

8.In Lync Server Deployment Wizard, click Install or Update Lync Server System, click Step 2: Setup or Remove Lync Server Components, click Next, review the summary, and then click Finish.

clip_image015
image

9.On the Lync Server FE servers, open the Lync Server Deployment Wizard.

10.In Lync Server Deployment Wizard, click Install or Update Lync Server System, click Step 2: Setup or Remove Lync Server Components, click Next, review the summary, and then click Finish.

11.To confirm that replication with the new Central Management store is occurring, in the Lync Server Management Shell, run ‘Get-CsManagementStoreReplicationStatus’ command and review the result.

Please note that, if you have a implemented mirroring for Lync 2013 databases then the migrated DBs will not be in getting a mirroring. To add the migrated DBs to mirroring you have to run the below command from Lync Management Shell. Please note that in this example ‘\\uclycdb003.ucserver.in\LyncSQLMirror$’ is my SQL share which is created for mirroring and ‘uclycdb001.ucserver.in’ is my primary database server where principle DBs are.

Install-CsMirrorDatabase -ConfiguredDatabases -FileShare "\\uclycdb003.ucserver.in\LyncSQLMirror$" -SqlServerFqdn "uclycdb001.ucserver.in" -ExcludeDatabaseList "cpsdyn","rgsdyn","rgsconfig","qoemetrics","lcscdr","rtcshared","rtcxds","rtcab"

Hope this will help, please let me know if you have any confusion so that i can try to help!

Wednesday, July 17, 2013

How to create a Dynamic Distribution Group with all Lync Users in it.

I am just finishing the migration of Lync 2010 to Lync 2013 for one of my client. While designing Lync 2013 infrastructure I had a question from my client on how to create a Exchange Dynamic DL with all Lync users in it. I was not able to answer this question at that time as customer is having a pure Exchange 2010 environment so I kept the question as parked and finally I could find a answer for  that. Please note that there is no straight way to do it from Exchange tools.

Here is the steps which I followed. Hope this will help someone who is looking for similar answer.

  1. Logon to Exchange server and go to run and type ‘Adsiedit.msc’ and press enter Key
    clip_image001
  2. Right click on ADSIEdit console root and select ‘Connect to..’
    clip_image002
  3. Keep as default and click on next
    clip_image003
  4. Browse through and locate an OU where you want create the DL. Right click on the OU and select New>Object…
    clip_image004
  5. Select ‘msExchDynamicDistributionList’ and click on next.
    clip_image005
  6. Give a name. In this example its #LyncAllUsers and click on Next
    clip_image006
  7. Select ‘More Attributes
    clip_image007
  8. Select ‘displayName’ and enter the name ‘#LyncAllUsers’ and click on set. Please change the name according to your requirement.
    clip_image008
  9. Select ‘Mail’ and enter the mail address ‘ ‘#LyncAllUsers@domain.com’ and click on set. Please change according to your requirement.
    clip_image009
  10. Select ‘MailNickname’ and enter ‘#LyncAllUsers’ and click on set. Please change according to your requirement.
    clip_image010
  11. Select ‘msExchangeDynamicDLFilter’ and enter ‘((objectClass=user) (| (msRTCSIP-UserEnabled=*) ) )’ and click on set. please note that this the most important step :)
    image
  12. Slect ‘ProxyAddresses’ and enter ‘#lyncAllUsers@domain.com’ and click on Add. Please change according to your requirement.
    clip_image012
  13. Finish.
    clip_image013
  14. Open Exchange Management Console and select Distribution group. Create a filter to show only ‘Dynamic Distribution Group’ and make sure that the newly create to DL is visible now.
    clip_image017
  15. Right click on the DL and go to properties.
    clip_image018
  16. You may get below warning, click on OK
    clip_image019
  17. Go to ‘Filter’ tab and use ‘Browse..’ option and select to root of the domain so that the filter will be applied for entire items in the domain and click on ‘Apply’. Click on ‘Preview’ to see the all members.
    clip_image020
    Note;If you get an error stating that there is no primary smtp address then go to e-mail tab and set a primary address.
  18. Open outlook in online mode or open OWA and make sure that the desired DL is visible in GAL.