Giter VIP home page Giter VIP logo

powershell's Introduction

Veeam Powershell Repository

Powershell sample scripts that can be reused / adapted. Please do not just execute scripts without understanding what each and every line will do. Scripts in this repository are community driven projects and are not created by Veeam R&D or validated by Veeam Q&A. They are maintained by community members which may or not be Veeam employees.

๐Ÿ“— Documentation

Documentation and usage instructions can be found with each script.

โœ Contributions

We welcome contributions from the community! We encourage you to create issues for Bugs & Feature Requests and submit Pull Requests for adding/updating scripts. For more detailed information, refer to our Contributing Guide.

๐Ÿค๐Ÿพ License

๐Ÿค” Questions

If you have any questions or something is unclear, please don't hesitate to create an issue and let us know!

powershell's People

Contributors

andrebore avatar anthonyspiteri avatar carceneaux avatar cevans3505 avatar chipzoller avatar cloud-dizzle avatar d-works42 avatar dchiavari avatar dellock6 avatar ivbysh avatar jhoughes avatar jhuttenga avatar jorgedlcruz avatar kosli avatar marcohorstmann avatar matteu31400 avatar mmehrtens avatar nielsengelen avatar ofeoktistov avatar poulpreben avatar ricowezenberg avatar rnelson0 avatar skitch210 avatar stefanz8n avatar tdewin avatar tsightler avatar tsmithco avatar tusc avatar vmarkusk avatar weylin-fr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powershell's Issues

Support for TLS in SMTP server

Is your script able to support TLS for the SMTP server?
I want to send via smtp.office365.com and that gives this error:

10/07/2023 17:11:32 - [ERROR] Send-MailMessage : Error in processing. The server response was: 5.7.3 STARTTLS is required to send mail [SYBPR01CA0209.ausprd01.prod.outlook.com 
2023-07-10T05:11:31.967Z 08DB7C994F8AAD26]
At C:\Reports\BR-MorningReport.ps1:225 char:5
+     Send-MailMessage -From $mail_From `
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
    + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage

New-VB365EnterpriseApplication.ps1 error on ApplicationKeyCredential End Date

Describe the bug
Got error executing the script.
The problem is during this call at line 93: New-AzureADApplicationKeyCredential
For some reason using this method "-EndDate $cert.GetExpirationDateString()" return the error described as if the EndDate retrieved were after the effective certificate end date.

I solved this issue using "$cert.NotAfter" instead "$cert.GetExpirationDateString()".
I modified also the start date, using "$cert.NotBefore".

Line 93 could be:
New-AzureADApplicationKeyCredential -ObjectId $app.ObjectId -CustomKeyIdentifier $base64Thumbprint -Type AsymmetricX509Cert -Usage Verify -Value $base64Value -StartDate $cert.NotBefore -EndDate $cert.NotAfter | Out-Null

To Reproduce
Steps to reproduce the behavior:

  1. Execute the script

Screenshots
image

BR-DataIntegrationAPIModule.psm1

Hello,

Long story short, I have a VBR in aws and one all-in-one (hyper-v, On host proxy, On host repository) server per site (20+ sites). I wondered if there was a way to tell the script to use the server where the job was running instead of using get-random. For example, I added the PS file to a test job in Toronto/Canada, and get-random attached the drive to a veeam proxy in Dallas/Texas. I was about to test using location tagging, but I did not plan to use that feature in the future.

It was only a 50 GB drive, but I am targeting bigger than that over a weekend.

Incompatibility with Veeam 9.5u4

Hi There,

This script BR-LicenseUsage appears to not be compatible with Veeam 9.5u4, the following message is received when attempting to execute the script:

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.Common.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:23 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.Common.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.Model.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:24 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.Model.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.LicenseLib.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:25 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.LicenseLib.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.DBManager.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:26 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.DBManager.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Unable to find type [Veeam.Backup.LicenseLib.CLicense].
At C:\Temp\VeeamAudit.ps1:418 char:8

  • $lic = [Veeam.Backup.LicenseLib.CLicense]::LoadLicFromRegistry()
  •    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.LicenseLib.CLicense:TypeName) [], R
      untimeException
    • FullyQualifiedErrorId : TypeNotFound

WARNING: [RentalVMUsage] Unable to get statistics. Ensure you use the latest version of Veeam Backu
p & Replication.
Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:334 char:139

  • ... form]::EEndPoint,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Workst ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:335 char:139

  • ... form]::EEndPoint,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Server ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:336 char:144

  • ... ::ELinuxPhysical,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Workst ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:337 char:144

  • ... ::ELinuxPhysical,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Server ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Thanks, Tyler

BR-NASBackup4NutanixFilesSMB.ps1 run commands with domain user

Is your feature request related to a problem? Please describe.
Our VBR server is for security reasons in a workgroup, our Nutanix Files share is in our Active Directory Domain, the Get-ChildItem commands fails because the VBR service is running with local user privileges.

Describe the solution you'd like
Add parameter for username, the script will lookup the "Windows Credential Manager" for the stored account and uses it to run the commands as different user

Describe alternatives you've considered
Using "Get-VBRCredentials" but the problem is that get-childitem needs PSCredential data type and "Get-VBRCredentials" return CCredential data type.

Additional context
Maybe something like this:

$Cred = Get-StoredCredential -Target "contoso.com\veeam_backup_agent"
Invoke-Command -Session $Cred -Scriptblock { 
	Get-ChildItem....
}

Formatting Issue on Job Policy

Describe the bug
The output html file does not properly display the policy name when spacing or dashes appear in the policy name. This does not appear to affect policy names with underscores in them.

To Reproduce
Steps to reproduce the behavior:

  1. Create Policy Name "Example - Test Backup"
  2. Run Backup
  3. Run BR-Morning Report
  4. See Policy name in report only shows "Example"

Expected behavior
The output should have the correct Policy name listed next to the machine

Screenshots
If applicable, add screenshots to help explain your problem.

Veeam (please complete the following information):

  • OS: Windows Server 2022
  • Browser N/A
  • Version v12 0713

Additional context

Form header shows up as yellow and warning when successful.

Same issue as last time just now with the warning and yellow color.
veeamcapture
The report shows warning with a yellow color even though the job is successful. The last time I had a warning status on the job was 1 month ago. Max variable is set to 1.

$mountdrive is an empty string

Upgrade-Veeam.ps1

I wasn't able to get this script to run with a local .iso. It very quickly errored out. Also, it wouldn't dismount the .iso despite mounting it without issue. I was able to pinpoint at least one issue- the $mountDrive variable was empty. Adding a -passthru to your $mount variable allowed the rest of the mount logic to go through. I'm running the script as I type this and so far so good. I can't say adding '-passthru' is the only solution, but it worked for me.

BR-GetBackupConfigModule.psm1 needs updated to reflect current 'EJobType' and other types

Describe the bug
BR-GetBackupConfigModule.psm1 is pretty outdated and doesn't contain all the 'EJobType' values for newer versions (current is v11a 11.0.1.1261).

More than likely (haven't yet confirmed) all the other types listed will need slight adjustments as well.

Additional context
Dump of EDBJobTypes on v11a (11.0.1.1261)

public enum EDbJobType
{
Backup = 0,
Replica = 1,
Copy = 2,
DRV = 3,
RestoreVm = 4,
RestoreVmFiles = 5,
RestoreFiles = 6,
Failover = 7,
QuickMigration = 8,
UndoFailover = 9,
FileLevelRestore = 10, // 0x0000000A
LinuxFileLevelRestore = 11, // 0x0000000B
InstantRecovery = 12, // 0x0000000C
RestoreHdd = 13, // 0x0000000D
Failback = 14, // 0x0000000E
PermanentFailover = 15, // 0x0000000F
UndoFailback = 16, // 0x00000010
CommitFailback = 17, // 0x00000011
ShellRun = 18, // 0x00000012
VolumesDiscover = 19, // 0x00000013
HvCtpRescan = 20, // 0x00000014
CatCleanup = 21, // 0x00000015
SanRescan = 22, // 0x00000016
CreateSanSnapshot = 23, // 0x00000017
FileTapeBackup = 24, // 0x00000018
FileTapeRestore = 25, // 0x00000019
TapeValidate = 26, // 0x0000001A
TapeInventory = 27, // 0x0000001B
VmTapeBackup = 28, // 0x0000001C
VmTapeRestore = 29, // 0x0000001D
SanMonitor = 30, // 0x0000001E
DeleteSanSnapshot = 31, // 0x0000001F
TapeErase = 32, // 0x00000020
TapeEject = 33, // 0x00000021
TapeExport = 34, // 0x00000022
TapeImport = 35, // 0x00000023
TapeCatalog = 36, // 0x00000024
TapeLibrariesDiscover = 37, // 0x00000025
PowerShellScript = 38, // 0x00000026
VmReconfig = 39, // 0x00000027
VmStart = 40, // 0x00000028
VcdVAppRestore = 41, // 0x00000029
VcdVmRestore = 42, // 0x0000002A
HierarchyScan = 46, // 0x0000002E
ViVmConsolidation = 47, // 0x0000002F
ApplicationLevelRestore = 48, // 0x00000030
RemoteReplica = 50, // 0x00000032
BackupSync = 51, // 0x00000033
SqlLogBackup = 52, // 0x00000034
LicenseAutoUpdate = 53, // 0x00000035
OracleLogBackup = 54, // 0x00000036
TapeMarkAsFree = 55, // 0x00000037
TapeDeleteFromLibrary = 56, // 0x00000038
TapeMoveToMediaPool = 57, // 0x00000039
TapeCatalogueDecrypted = 58, // 0x0000003A
StorageCopyPolicy = 60, // 0x0000003C
StorageCopyWorker = 61, // 0x0000003D
StorageCopyParentWorker = 62, // 0x0000003E
SimpleBackupCopyWorker = 63, // 0x0000003F
QuickMigrationCheck = 64, // 0x00000040
SimpleBackupCopyPolicy = 65, // 0x00000041
SimpleSqlBackupCopyWorker = 68, // 0x00000044
SimpleOracleBackupCopyWorker = 69, // 0x00000045
SimpleBackupCopyParentWorker = 70, // 0x00000046
SimplePostgresBackupCopyWorker = 71, // 0x00000047
RepoCopyPolicy = 73, // 0x00000049
PostgreSqlLogBackup = 74, // 0x0000004A
ConfBackup = 100, // 0x00000064
ConfRestore = 101, // 0x00000065
ConfResynchronize = 102, // 0x00000066
WaGlobalDedupFill = 103, // 0x00000067
DatabaseMaintenance = 104, // 0x00000068
RepositoryMaintenance = 105, // 0x00000069
InfrastructureRescan = 106, // 0x0000006A
DiskInstantRecovery = 110, // 0x0000006E
DiskInstantPublishingViaNfs = 111, // 0x0000006F
DiskInstantPublishingViaMount = 112, // 0x00000070
MountServiceMount = 113, // 0x00000071
InstantFileShareRestore = 120, // 0x00000078
CheckRootSecurityInfoForNasBackup = 121, // 0x00000079
FirstClassDiskInstantRestore = 130, // 0x00000082
FirstClassDiskQuickMigration = 131, // 0x00000083
HvLabDeploy = 200, // 0x000000C8
HvLabDelete = 201, // 0x000000C9
FailoverPlan = 202, // 0x000000CA
UndoFailoverPlan = 203, // 0x000000CB
FailoverPlanTask = 204, // 0x000000CC
UndoFailoverPlanTask = 205, // 0x000000CD
PlannedFailover = 206, // 0x000000CE
ViLabDeploy = 207, // 0x000000CF
ViLabDelete = 208, // 0x000000D0
ViLabStart = 209, // 0x000000D1
Cloud = 300, // 0x0000012C
CloudApplDeploy = 301, // 0x0000012D
HardwareQuotasProcessing = 302, // 0x0000012E
ReconnectVpn = 303, // 0x0000012F
DisconnectVpn = 304, // 0x00000130
OrchestratedTask = 305, // 0x00000131
ViReplicaRescan = 306, // 0x00000132
ExternalRepositoryMaintenance = 307, // 0x00000133
DeleteBackup = 308, // 0x00000134
CloudProviderRescan = 309, // 0x00000135
CdpReplica = 316, // 0x0000013C
AzureApplDeploy = 401, // 0x00000191
TapeTenantRestore = 500, // 0x000001F4
TapeCopy = 501, // 0x000001F5
Unknown = 666, // 0x0000029A
EndpointBackup = 4000, // 0x00000FA0
EndpointRestore = 4005, // 0x00000FA5
BackupCacheSync = 4010, // 0x00000FAA
EndpointSqlLogBackup = 4020, // 0x00000FB4
EndpointOracleLogBackup = 4021, // 0x00000FB5
OracleRMANBackup = 4030, // 0x00000FBE
SapHanaBackintBackup = 4031, // 0x00000FBF
OracleRMANRestore = 4032, // 0x00000FC0
SapHanaBackintRestore = 4033, // 0x00000FC1
OracleRMANBackupCopyWorker = 4035, // 0x00000FC3
SapHanaBackintBackupCopyWorker = 4037, // 0x00000FC5
PluginBackupCopyPolicy = 4038, // 0x00000FC6
SapOracleBackintBackup = 4040, // 0x00000FC8
SapOracleBackintRestore = 4041, // 0x00000FC9
SapOracleBackintBackupCopyWorker = 4042, // 0x00000FCA
DbPluginMetaUpgradeJob = 4100, // 0x00001004
CloudBackup = 5000, // 0x00001388
RestoreVirtualDisks = 6000, // 0x00001770
RestoreAgentVolumes = 6001, // 0x00001771
InfraItemSave = 7000, // 0x00001B58
InfraItemUpgrade = 7001, // 0x00001B59
InfraItemDelete = 7002, // 0x00001B5A
AzureWinProxySave = 7003, // 0x00001B5B
CdpClustersDeploy = 7100, // 0x00001BBC
FileLevelRestoreByEnterprise = 8000, // 0x00001F40
RepositoryEvacuate = 9000, // 0x00002328
LogsExport = 10000, // 0x00002710
InfraStatistic = 10001, // 0x00002711
AzureVmRestore = 11000, // 0x00002AF8
EpAgentManagement = 12000, // 0x00002EE0
EpAgentDiscoveryObsolete = 12001, // 0x00002EE1
EpAgentPolicy = 12002, // 0x00002EE2
EpAgentBackup = 12003, // 0x00002EE3
EpAgentTestCreds = 12004, // 0x00002EE4
EpAgentDiscovery = 12005, // 0x00002EE5
Retention = 12006, // 0x00002EE6
EpAgentOperationBackupNow = 12007, // 0x00002EE7
EpAgentOperationActiveFull = 12008, // 0x00002EE8
EpAgentOperationStopBackup = 12009, // 0x00002EE9
EpAgentOperationPurgeCache = 12010, // 0x00002EEA
NasBackup = 13000, // 0x000032C8
NasBackupBrowse = 13001, // 0x000032C9
NasRestore = 13002, // 0x000032CA
NasBackupCopy = 13003, // 0x000032CB
NasDownloadMeta = 13004, // 0x000032CC
VmbApiPolicyTempJob = 14000, // 0x000036B0
PlatformSnapshotJob = 15000, // 0x00003A98
PlatformBackupJob = 15001, // 0x00003A99
PlatformSnapshotCopyJob = 15002, // 0x00003A9A
PlatformServiceJob = 15003, // 0x00003A9B
PlatformBackupArchieveJob = 15004, // 0x00003A9C
AmazonRestore = 16000, // 0x00003E80
StagedRestore = 17000, // 0x00004268
ArchiveBackup = 18000, // 0x00004650
ArchiveRehydration = 18001, // 0x00004651
ArchiveDownload = 18002, // 0x00004652
ArchiveSync = 18003, // 0x00004653
ArchiveCopy = 18004, // 0x00004654
ArchiveFreezing = 18005, // 0x00004655
PublishBackup = 18006, // 0x00004656
CloudBinArchiveTierDownload = 18007, // 0x00004657
HvStagedRestore = 19000, // 0x00004A38
VbkExport = 20000, // 0x00004E20
GuestScriptingConnect = 21000, // 0x00005208
ForeignTransform = 22000, // 0x000055F0
AuditZip = 23000, // 0x000059D8
CustomPlatformRestoreVm = 24000, // 0x00005DC0
CustomPlatformDiskRestore = 24001, // 0x00005DC1
CustomPlatformFileLevelRestore = 24002, // 0x00005DC2
CustomPlatformBackupDataRetrieval = 24003, // 0x00005DC3
SwitchReplicaToProduction = 25000, // 0x000061A8
RestAutomation = 26000, // 0x00006590
GoogleRestore = 27000, // 0x00006978

Connect-VB365RestorePortal.ps1 not working

Describe the bug
The script "Connect-VB365RestorePortal.ps1" is not working.

To Reproduce
Steps to reproduce the behavior:

  1. Add the correct applicationID in the script and launch it
  2. Login with credential with admin privileges
  3. See error

Expected behavior
The script creates new service principal

Screenshots
image

Additional context
The user used to login into Microsoft Organization has full privileges

Report show's failed on form header even though the session is successful

veeamcapture
The picture shows that the top of the form is the color red and reads error, even though all of the backups in this job are successful. I looked through and it seems to be the same on every job that had a recent failure. I have the max variable set to 1 so that I only get the results of the last session, but it looks like it is pulling the info for the top of the form from all of the job session history.

VB365-ExportMailboxToPST fails at message total+1

@chris_arceneaux

Is this the expected behavior ?

Export-UserMailbox.ps1

Export Exchange Items Session
Processing 101 out of 21174 items...
...

Then at the end:
...
Exporting mailbox: (Not Realname - [email protected]) to s:\restore\notreal.pst
C:\Scripts\Export-UserMailbox.ps1 : Error encountered. Stopping restore session.
The value 21175 must be in the range from 0 to 21174.
Parameter name: value
At line:1 char:1

  • C:\Scripts\Export-UserMailbox.ps1
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-UserMailbox.ps1
    
    
    

==
Should I trust the created .pst even if it fails at the end ?

Please update for version 5

Describe the bug
A clear and concise description of what the bug is.

The command Get-VBOOrganizationMailbox on line26 has been deprecated and replaced by Get-VBOOrganizationUser and VBOBackupItem instead.

Is there an update to this script to reflect these changes?
Or is there any where I can get assistance to try and make it work
e.g. Would this work?

O365 PowerShell call - Return all Exchange Mailboxes

Try
{
$MailBoxes = Get-VBOOrganizationUser -Organization $org
}
Catch
{
Write-Host "No mailboxes defined!"
Exit 1
}

Exchange Powershell call - Return all Exchange Mailbox under the Organisational Unit $OrgUnit defined above.

Try
{
$mbxs = Get-Mailbox -OrganizationalUnit $OrgUnit -ResultSize Unlimited
}
Catch
{
Write-Host "No mailboxes within $OrgUnit defined!"
Exit 1
}

Many Thanks

$MissingComponents returns $false if any prereq is already installed

Describe the bug

Issue in:
https://github.com/VeeamHub/powershell/blob/master/BR-UnattendedInstall-v10/Install_Veeam.ps1
On line 142

The script checks for any missing Components and missing Prerequisites.
If any of the Prerequisites ISN'T missing, then none of Components and Prerequisites are installed.

Erroneous code snippet:
$MissingComponents = [bool]($Script:dotNETRequired -AND $Script:LicenseFileMissing -AND $Script:SQL2014_CLR_Missing -AND $Script:SQL2014_SMO_Missing -AND $Script:MSReportViewer2015_Missing)

To Reproduce
Steps to reproduce the behavior:

[bool]$dotNETRequired = $false
[bool]$SQL2014_CLR_Missing = $true
[bool]$SQL2014_SMO_Missing = $true
[bool]$MSReportViewer2015_Missing = $true
[bool]$LicenseFileMissing = $true

$MissingComponents = [bool]($dotNETRequired -AND $SQL2014_CLR_Missing -AND $SQL2014_SMO_Missing -AND $MSReportViewer2015_Missing)
$MissingComponents

Expected behavior
$MissingComponents should be $true if any Components or Prerequisites is missing.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: [Windows Server 2019]
  • Version [Veeam VBR 10a]

Additional context
Not exactly sure how to handle this logic.

vb365-jobmanager.ps1 Super Long Execution Times - Is It Necessary?

Description
I have discovered a line in this script that retrieves objects in a managed job and converts them to ManagedObject:class. This does not seem to then be utilised anywhere else in the code but is taking up the majority of execution time (3 hours out of 3.5 hours). I have commented this out in my implementation of this script, but I thought I would get input from the script author to better understand why he is using this and if it affects any other part of the script.

Code Snippet

[ManagedObject[]] GetManagedObjects() {

    #TODO: Is there any need to get the weight at this point for already present objects?
    
    $this.LoadWeightTable()
    
    $VBOBackupItems = Get-VBOBackupItem -Job $this.VBOJob

    ## Check if item is in weighttable and add as managed object with it's weight

    $objects = $VBOBackupItems | ForEach-Object { [ManagedObject]::new($_) }
                
    return $objects
}

Line of Concern
$objects = $VBOBackupItems | ForEach-Object { [ManagedObject]::new($_) }

Doesn't pickup VMs or Hosts from failover plan

Hi there

I tried your script today for linux replica re-ip, and found some issues against our environment.

The first one is because we add VMs to the Veeam failover plan using the "VMs and Templates" picker rather than by "Tag" or "Hosts and Clusters" view, your Get-VBRFailoverPlanVMs command doesn't find any VMs.

After adding the VMs via the "Hosts and Clusters" view instead, it gets further but doesn't return a valid parent host ID, as it seems to be looking for DNS name, and our servers are added to vCenter via IP only (no local DNS was available when building this cluster).

Is it possible to account for these 2 possibilities above in your scripts?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.