вторник, 30 августа 2016 г.

Remove unneeded apps from Windows 10

Run Powershell As Administrator and enter commands:

Remove 3D from Windows 10
Get-AppxPackage *3d* | Remove-AppxPackage

Remove Camera from Windows 10
Get-AppxPackage *camera* | Remove-AppxPackage

Remove Mail and Calendar from Windows 10
Get-AppxPackage *communi* | Remove-AppxPackage

Remove Money, Sports, News and Weather from Windows 10
Get-AppxPackage *bing* | Remove-AppxPackage

Remove Groove Music and Film & TV from Windows 10
Get-AppxPackage *zune* | Remove-AppxPackage

Remove People from Windows 10
Get-AppxPackage *people* | Remove-AppxPackage

Remove Phone Companion from Windows 10
Get-AppxPackage *phone* | Remove-AppxPackage

Remove Solitaire Collection from Windows 10
Get-AppxPackage *solit* | Remove-AppxPackage

Remove Voice Recorder from Windows 10
Get-AppxPackage *soundrec* | Remove-AppxPackage

Remove Xbox from Windows 10
Get-AppxPackage *xbox* | Remove-AppxPackage

понедельник, 29 августа 2016 г.

Change Windows 2012 R2 Server Edition

Step-by-step guide

  1. To determine which versions the server can be upgraded to run:

  • DISM /online /Get-TargetEditions

      2.  As can be seen from the above screenshot this version of Windows Server can be upgraded to Target Edition : ServerDatacenter
           To complete the conversion between editions we use the DISM command with the following format:
  • DISM /online /Set-Edition:<Version> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEULA
In the above example the target edition is ServerDatacenter


Set Calendar permissions in Office365

You can add permissions on a specific mailbox, or you can add it onto a security group.


Step-by-step guide

  1. Run Windows Powershell as Administrator
  2. Login to Office365 with your admin account with command:  
    $LiveCred = Get-Credential


    1. Import session for Office365 manage:
      $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

    2. Provide permissions:
      Add-MailboxFolderPermission -Identity user1@domain.com:\calendar -user user2@domain.com -AccessRights Editor

      1

      The AccessRights parameter also specifies the permissions for the user with the following roles, which are a combination of the rights listed previously:

      • None – FolderVisible
      • Owner – CreateItems, ReadItems, CreateSubfolders, FolderOwner, FolderContact, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • PublishingEditor – CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • Editor – CreateItems, ReadItems, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems
      • PublishingAuthor – CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, DeleteOwnedItems
      • Author – CreateItems, ReadItems, FolderVisible, EditOwnedItems, DeleteOwnedItems
      • NonEditingAuthor – CreateItems, ReadItems, FolderVisible
      • Reviewer – ReadItems, FolderVisible
      • Contributor – CreateItems, FolderVisible


How to register a C# or VB.Net DLL using regasm.exe

Step-by-step guide

  1. Register: 
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319 \RegAsm.exe" "C:\xpst\XPST.dll" /tlb:XPST.tlb /codebase
  2. Unregister:
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe""C:\xpst\XPST.dll" /tlb:XPST.tlb /codebase /u

четверг, 14 июля 2016 г.

Exchange Server mailbox permissions with Powershell

Send on Behalf – This will grant testuser user send on behalf permissions for Accounting mailbox:

 Set-Mailbox accounting -GrantSendOnBehalfTo testuser


Send As – This will grant testuser user send as permissions for Accounting mailbox:

Add-ADPermission accounting -ExtendedRights Send-As -user testuser



Full Mailbox Access – This will grant testuser user, full access to Accountng's Mailbox:

Add-MailboxPermission -Identity accounting -User testuser -AccessRights FullAccess -InheritanceType All

среда, 13 июля 2016 г.

Allow Anonymous LDAP Binding to an AD LDS Instance




Step by step:


  1. Click Start, point to Administrative Tools, and then click ADSI Edit.
  2. Connect and bind to the configuration directory partition of the AD LDS instance on which you want to allow anonymous LDAP binding. For more information, see Manage an AD LDS Instance Using ADSI Edit.
  3. In the console tree, double-click the configuration directory partition (CN=Configuration,CN={GUID}), double-click the services container (CN=Services), double-click the Windows NT container (CN=Windows NT), right-click the directory service container (CN=Directory Service), and then click Properties.
  4. In Attributes, click dsHeuristics, and then click Edit.
  5. In Value, modify the value of the seventh character in the attribute (counting from the left) to 2, as follows:
    0000002001001
  6. Click OK twice.

вторник, 12 июля 2016 г.

Using ADSIedit to Add or Remove E-mail aliases on on-Premises Active Directory


If you are synchronising your Office 365 account with your on-premises exchange/Active Directory, you will know that you cannot edit exchange user properties using the Office 365 administrator portal.
If you try, you will come across this error or a similar one:
The operation on mailbox “employee-mailbox” failed because it’s out of the current user’s write scope. The action ‘Set-Mailbox’, ‘EmailAddresses’, can’t be performed on the object ‘employee-mailbox’ because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization.

In this article, you can know how to add e-mail aliases using the Active Directory Service Interfaces Editor (adsiedit).

Step-by-step guide

  1. Go to Start > Run and type adsiedit.msc
  2. Now, find the unit where your AD user’s reside (for example: Fabricam - Office-RU-SPB)
  3. Right click the user you want to edit and click Properties.
  4. Find the variable proxyAddresses – this is the one you want to edit. 
    When you add new e-mail aliases, you need to make sure that your primary e-mail address will start with upper-case SMTP. Your aliases -  secondary addresses should be lower-case smtp. For example: 
    In the proxyAddresses attribute, you need put:
    SMTP:firstnamelastname@domain.com - Primary address
    smtp:firstnamelastname@domain.com  - alias, aka secondary address