-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAzure Taşıma Scripti.ps1
80 lines (63 loc) · 2.78 KB
/
Azure Taşıma Scripti.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Import-Module MSOnline
$LiveCred = Get-Credential
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
Connect-MsolService –Credential $LiveCred
Get-MsolUser
Get-Mailbox
Get-AuthServer | Format-List *
Get-ManagementRole
Get-DkimSigningConfig
get-mailbox | Set-MailboxRegionalConfiguration -Language 1055 -DateFormat d.MM.yyyy -TimeZone "Turkey Standard Time"
get-mailbox | Set-MailboxRegionalConfiguration -Language 1055 -TimeZone "Turkey Standard Time"
Get-MailboxRegionalConfiguration -Identity "marketing"
get-mailbox
Install-Module AzureRM -force
Install-Module Azure -force
Import-Module AzureRm
Import-Module Azure
Login-AzureRmAccount
Add-AzureAccount
Get-AzureRmSubscription
#Yeni Taşınacak Azure Subs ID Exp. CSP
Select-AzureRmSubscription -SubscriptionId 43504e3b-a698-462c-b1de-134f3be9387e
#Taşıması yapılacak Eski Azure Subs ID Exp. Bizpark
Get-AzureSubscription
Select-AzureSubscription -SubscriptionId a5c4e881-57c4-4240-9494-483ff28288c9
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
#Provide the subscription Id of the subscription where managed disk exists Example:Bizpark
$sourceSubscriptionId='a5c4e881-57c4-4240-9494-483ff28288c9'
#Provide the name of your resource group where managed disk exists Example:Bizpark
$sourceResourceGroupName='TEMP'
#Provide the name of the managed disk Disk Adı Example:Bizpark
$managedDiskName='temp-workspace_OsDisk_1_b6d8581cf28a4aff970b60af38a6b113'
#Set the context to the subscription Id where Managed Disk exists
Select-AzureRmSubscription -SubscriptionId $sourceSubscriptionId
#Get the source managed disk
$managedDisk= Get-AzureRMDisk -ResourceGroupName $sourceResourceGroupName -DiskName $managedDiskName
#Provide the subscription Id of the subscription where managed disk will be copied to
#If managed disk is copied to the same subscription then you can skip this step
$targetSubscriptionId='43504e3b-a698-462c-b1de-134f3be9387e'
#Name of the resource group where snapshot will be copied to
$targetResourceGroupName='TEMP'
#Set the context to the subscription Id where managed disk will be copied to
#If snapshot is copied to the same subscription then you can skip this step
Select-AzureRmSubscription -SubscriptionId $targetSubscriptionId
$diskConfig = New-AzureRmDiskConfig -SourceResourceId $managedDisk.Id -Location $managedDisk.Location -CreateOption Copy
#Create a new managed disk in the target subscription and resource group
New-AzureRmDisk -Disk $diskConfig -DiskName $managedDiskName -ResourceGroupName $targetResourceGroupName