Posts Tagged ‘merge’

 

#Get Active Directory information for current user

$UserName = $env:username

$Filter = “(&(objectCategory=User)(samAccountName=$UserName))”

$Searcher = New-Object System.DirectoryServices.DirectorySearcher

$Searcher.Filter = $Filter

$ADUserPath = $Searcher.FindOne()

$ADUser = $ADUserPath.GetDirectoryEntry()

$ADDisplayName = $ADUser.name

$ADTitle = $ADUser.title

$ADOffice = $ADUser.physicalDeliveryOfficeName

$script:ADMobileNumber = $script:ADUser.mobile

$ADTelePhoneNumber = $ADUser.telephoneNumber

$ADExtension1 = $ADUser.extensionAttribute1

$ADExtension2 = $ADUser.extensionAttribute2

$ADExtension3 = $ADUser.extensionAttribute3

 

#Additional Variables

$AppData=(Get-Item env:appdata).value

$SigPath = ‘\Microsoft\Signatures’

$LocalSignaturePath = $AppData+$SigPath

$SignatureName = '%signaturename%'

$DomainName = '%domainname%'

$fulladdetails = $ADDisplayName+$ADExtension1+$ADTitle+$ADOffice+$script:ADMobileNumber+$ADTelePhoneNumber

 

#Check if signature directory exists and, if not, update it

If (Test-Path $LocalSignaturePath)

{}

Else

{New-Item $LocalSignaturePath -type directory}

 

Write-host $fulladdetails

 

#Check if  Signature has changed

If ("$fulladdetails" -eq "$SigChkDetails")

{ Exit }

Else

{  }

 

#Delete old signature files

Remove-Item "$LocalSignaturePath\$ADDisplayName.htm" -Recurse -Force

 

#Copy over signature template

$SigSource = “\\path\to\signature\source"

$filename = "\\path\to\signature\template.htm"

$filename2 = "\\path\to\logo.jpg"

 

Copy-Item $filename $LocalSignaturePath -Recurse -Force

Copy-Item $filename2 $LocalSignaturePath -Recurse -Force
 

#Modify Signature and Insert Variables

(Get-Content $LocalSignaturePath\template.htm) -replace 'FullName', $ADDisplayName | Set-Content $LocalSignaturePath\template.htm

(Get-Content $LocalSignaturePath\template.htm) -replace 'PositionTitle', $ADTitle | Set-Content $LocalSignaturePath\template.htm

(Get-Content $LocalSignaturePath\template.htm) -replace 'PhoneNumber', $ADTelePhoneNumber | Set-Content $LocalSignaturePath\template.htm

 

If(!$script:ADMobileNumber -or !$ADExtension2){

(Get-Content $LocalSignaturePath\template.htm) -replace '<b>M</b> MobileNumber', $NULL | Set-Content $LocalSignaturePath\template.htm}

ELSE

{(Get-Content $LocalSignaturePath\template.htm) -replace 'MobileNumber', $script:ADMobileNumber | Set-Content $LocalSignaturePath\template.htm}

 

If(!$ADExtension1){

(Get-Content $LocalSignaturePath\template.htm) -replace ', Qualification', $NULL | Set-Content $LocalSignaturePath\template.htm}

ELSE

{(Get-Content $LocalSignaturePath\template.htm) -replace 'Qualification', $ADExtension1 | Set-Content $LocalSignaturePath\template.htm}

 

If($ADOffice -ne 'Singapore'){

If(!$ADExtension3){

(Get-Content $LocalSignaturePath\template.htm) -replace 'ImageRow', '<img src="./logo.jpg" width="259" height="74" border="0" />' | Set-Content $LocalSignaturePath\template.htm}

}ELSE

{(Get-Content $LocalSignaturePath\template.htm) -replace 'ImageRow', $null | Set-Content $LocalSignaturePath\template.htm}



 

Rename-Item -Path $LocalSignaturePath\template.htm -NewName "$ADDisplayName.htm"

 

#Set company signature as default for New messages

[Void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word")

$MSWord = New-Object -com word.application

$EmailOptions = $MSWord.EmailOptions

$EmailSignature = $EmailOptions.EmailSignature

$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries

$EmailSignature.NewMessageSignature=$ADDisplayName

$MSWord.Quit()

 

#Set company signature as default for Reply messages

[Void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word")

$MSWord = New-Object -com word.application

$EmailOptions = $MSWord.EmailOptions

$EmailSignature = $EmailOptions.EmailSignature

$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries

$EmailSignature.ReplyMessageSignature=$ADDisplayName

$MSWord.Quit() 
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
  1. Check the volume has enough free space, if a previous merge (deletion of checkpoint ) has failed this might be why

Navigate to the cluster share and check the .avhdx’s

Windows Explorer - VHDX AVHDX File

 

Hyper-V Console Method

You can also use the Hyper-V console in Windows 10 to perform the merge operation. The first thing you’ll want to do is open the Hyper-V console. Next, right-click the Hyper-V host and click Edit Disk.

Hyper-V Console - Edit Disk

After clicking Edit Disk, you’ll be presented with a wizard, where you’ll point Hyper-V to the .avhdx file that you want to merge.

IMPORTANT: Select the .avhdx file, and not the .vhdx file, otherwise you won’t see the Merge operation available!

Hyper-V Edit Disk - Locate Virtual Hard Disk

On the next wizard screen, select the Merge action.

Hyper-V Edit Disk - Merge Action

Next, you’ll need to choose the destination for the merge operation. In most cases, you’ll choose the To the parent virtual hard disk option.

Hyper-V Edit Disk - Select Parent

Finally, on the Summary page of the disk editing wizard, just complete the wizard, and it will merge your disks for you. That’s all there is to it!

Hyper-V Edit Disk - Complete Wizard

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

20125564-5908[1]This may be required if a customer has been through multiple IT companies and the old companies were not forthcoming with licensing information


The customer will be required to write a letter of authorization on the customers letterhead stating the following

 

Hi Microsoft

 

I authorize the following:

  1. License trace report for <every company trading name>

<every street address>

  1. Please transfer all licenses to the following email: <email that the licenses will be consolidated to>

 

Regards

<Managers Name>

<Customer Name>

 

Email this letter to vlservp@microsoft.com with the subject line ‘Ticket Reference# <ticket number here> – A letter of authorization for license transfer

 

You can get a ticket number from the Volume licensing support number 1800 002 691 (they will generate a ticket)

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)