├── .gitattributes
├── .gitignore
├── DSC
└── README.md
├── LICENSE.txt
├── Modules
├── Backup-VCSA
│ └── Backup-VCSA.psm1
├── ContentLibrary
│ └── ContentLibrary.psm1
├── CrossvCentervmotion
│ └── XVM.psm1
├── DatastoreFunctions
│ └── DatastoreFunctions.psm1
├── Get-NICDetails
│ └── Get-NICDetails.psm1
├── Get-NewAndRemovedVMs
│ └── Get-NewAndRemovedVMs.psm1
├── Get-VMmaxIOPS
│ └── Get-VMmaxIOPS.psm1
├── InstantClone
│ └── InstantClone.psm1
├── Konfig-ESXi
│ └── Konfig-ESXi.psm1
├── NSXT
│ ├── NSXT.psd1
│ └── NSXT.psm1
├── PSvLIMessage
│ └── PSvLIMessage.psm1
├── PerVMEVC
│ └── PerVMEVC.psm1
├── ProactiveHA
│ └── ProactiveHA.psm1
├── README.md
├── Recommend-Sizing
│ └── Recommend-Sizing.psm1
├── SRM
│ ├── .gitattributes
│ ├── .gitignore
│ ├── Examples
│ │ ├── ReportConfiguration.ps1
│ │ └── SrmTagging.ps1
│ ├── LICENSE.txt
│ ├── Meadowcroft.Srm.Protection.ps1
│ ├── Meadowcroft.Srm.Recovery.ps1
│ ├── Meadowcroft.Srm.Storage.ps1
│ ├── Meadowcroft.Srm.psd1
│ ├── Meadowcroft.Srm.psm1
│ ├── NOTICE.txt
│ └── README.md
├── SaltStackConfig
│ ├── SaltStackConfig.Format.ps1xml
│ ├── SaltStackConfig.psd1
│ └── SaltStackConfig.psm1
├── Set-CBT
│ └── Set-CBT.psm1
├── Start-UNMAP
│ └── Start-UNMAP.psm1
├── VAMI
│ └── VAMI.psm1
├── VCHA
│ └── VCHA.psm1
├── VCSA
│ └── VCSA.psm1
├── VISecret
│ ├── README.md
│ ├── VMware.VISecret.psd1
│ └── VMware.VISecret.psm1
├── VMCPFunctions
│ └── VMCPFunctions.psm1
├── VMFSIncrease
│ ├── LICENSE.txt.URL
│ ├── VMFSIncrease.psd1
│ ├── VMFSIncrease.psm1
│ └── en-US
│ │ ├── VMFSIncrease.psm1-Help.xml
│ │ └── about_VMFSIncrease.help.txt
├── VMToolsManagement
│ └── VMToolsManagement.psm1
├── VMware-vCD-Module
│ ├── LICENSE
│ ├── README.md
│ ├── VMware-vCD-Module.psd1
│ ├── examples
│ │ └── OnBoarding.json
│ ├── functions
│ │ ├── Invoke-MyOnBoarding.psm1
│ │ ├── New-MyEdgeGateway.psm1
│ │ ├── New-MyOrg.psm1
│ │ ├── New-MyOrgAdmin.psm1
│ │ ├── New-MyOrgNetwork.psm1
│ │ └── New-MyOrgVdc.psm1
│ ├── media
│ │ ├── Invoke-MyOnBoarding.png
│ │ └── VSCode-Pester-Tests.png
│ └── tests
│ │ └── VMware-vCD-Module.Tests.ps1
├── VMware-vCD-TenantReport
│ ├── README.md
│ ├── VMware-vCD-TenantReport.psd1
│ ├── functions
│ │ └── Get-VcdTenantReport.psm1
│ ├── media
│ │ └── Get-VcdTenantReport.png
│ ├── modules
│ │ └── PowerStartHTML
│ │ │ ├── PowerStartHTML.psd1
│ │ │ └── PowerStartHTML.psm1
│ └── tests
│ │ └── VMware-vCD-TenantReport.Tests.ps1
├── VMware.CSP
│ └── VMware.CSP.psm1
├── VMware.Community.CISTag
│ ├── VMware.Community.CISTag.psd1
│ └── VMware.Community.CISTag.psm1
├── VMware.DRaaS
│ ├── VMware.DRaaS.psd1
│ └── VMware.DRaaS.psm1
├── VMware.HCX
│ ├── VMware.HCX.psd1
│ └── VMware.HCX.psm1
├── VMware.Hosted
│ ├── VMware.Hosted.psd1
│ └── VMware.Hosted.psm1
├── VMware.Hv.Helper
│ ├── Json
│ │ ├── Farm
│ │ │ ├── AutomatedInstantCloneFarm.json
│ │ │ ├── AutomatedLinkedCloneFarm.json
│ │ │ ├── AutomatedLinkedCloneFarmVGPU.json
│ │ │ └── ManualFarm.json
│ │ └── Pool
│ │ │ ├── FullClone.json
│ │ │ ├── InstantClone.json
│ │ │ ├── LinkedClone.json
│ │ │ ├── ManualSpec.json
│ │ │ └── RdsSpec.json
│ ├── README.md
│ ├── Set-HVFarm
│ │ ├── AutomatedEditFarm.json
│ │ └── ManualEditFarm.json
│ ├── Set-HVGlobalSettings
│ │ └── Set-HVGlobalSettings.json
│ ├── Set-HVPool
│ │ ├── AutomatedEditPool.Json
│ │ ├── ManualEditPool.json
│ │ └── RdsEditPool.json
│ ├── VMware.HV.Helper.format.ps1xml
│ ├── VMware.HV.Helper.psd1
│ ├── VMware.HV.Helper.psm1
│ └── docs
│ │ ├── Add-HVDesktop.md
│ │ ├── Add-HVRDSServer.md
│ │ ├── Clear-HVEventDatabase.md
│ │ ├── Connect-HVEvent.md
│ │ ├── Disconnect-HVEvent.md
│ │ ├── Get-HVApplication.md
│ │ ├── Get-HVBaseImageVM.md
│ │ ├── Get-HVEntitlement.md
│ │ ├── Get-HVEvent.md
│ │ ├── Get-HVEventDatabase.md
│ │ ├── Get-HVFarm.md
│ │ ├── Get-HVFarmSummary.md
│ │ ├── Get-HVGlobalEntitlement.md
│ │ ├── Get-HVGlobalSession.md
│ │ ├── Get-HVGlobalSettings.md
│ │ ├── Get-HVHealth.md
│ │ ├── Get-HVHomeSite.md
│ │ ├── Get-HVInternalName.md
│ │ ├── Get-HVLocalSession.md
│ │ ├── Get-HVMachine.md
│ │ ├── Get-HVMachineSummary.md
│ │ ├── Get-HVPodFederation.md
│ │ ├── Get-HVPool.md
│ │ ├── Get-HVPoolSpec.md
│ │ ├── Get-HVPoolSummary.md
│ │ ├── Get-HVPreInstalledApplication.md
│ │ ├── Get-HVQueryFilter.md
│ │ ├── Get-HVQueryResult.md
│ │ ├── Get-HVResourceStructure.md
│ │ ├── Get-HVSite.md
│ │ ├── Get-HVlicense.md
│ │ ├── Get-HVvCenterServer.md
│ │ ├── Get-HVvCenterServerHealth.md
│ │ ├── New-HVEntitlement.md
│ │ ├── New-HVFarm.md
│ │ ├── New-HVGlobalEntitlement.md
│ │ ├── New-HVHomeSite.md
│ │ ├── New-HVManualApplication.md
│ │ ├── New-HVPodFederation.md
│ │ ├── New-HVPool.md
│ │ ├── New-HVPreInstalledApplication.md
│ │ ├── New-HVSite.md
│ │ ├── Register-HVPod.md
│ │ ├── Remove-HVApplication.md
│ │ ├── Remove-HVApplicationIcon.md
│ │ ├── Remove-HVEntitlement.md
│ │ ├── Remove-HVFarm.md
│ │ ├── Remove-HVGlobalEntitlement.md
│ │ ├── Remove-HVMachine.md
│ │ ├── Remove-HVPodFederation.md
│ │ ├── Remove-HVPool.md
│ │ ├── Remove-HVSite.md
│ │ ├── Reset-HVMachine.md
│ │ ├── Set-HVApplication.md
│ │ ├── Set-HVApplicationIcon.md
│ │ ├── Set-HVEventDatabase.md
│ │ ├── Set-HVFarm.md
│ │ ├── Set-HVGlobalEntitlement.md
│ │ ├── Set-HVGlobalSettings.md
│ │ ├── Set-HVInstantCloneMaintenance.md
│ │ ├── Set-HVMachine.md
│ │ ├── Set-HVPodFederation.md
│ │ ├── Set-HVPool.md
│ │ ├── Set-HVSite.md
│ │ ├── Set-HVlicense.md
│ │ ├── Start-HVFarm.md
│ │ ├── Start-HVPool.md
│ │ └── Unregister-HVPod.md
├── VMware.Skyline.InsightsApi
│ ├── VMware.Skyline.InsightsApi.Format.ps1xml
│ ├── VMware.Skyline.InsightsApi.psd1
│ └── VMware.Skyline.InsightsApi.psm1
├── VMware.TrustedInfrastructure.Helper
│ ├── README.md
│ ├── VMware.TrustedInfrastructure.Helper.psd1
│ └── VMware.TrustedInfrastructure.Helper.psm1
├── VMware.VCGChecker
│ ├── Export-VCGReport.ps1
│ ├── Get-VCGHWInfo.ps1
│ ├── Get-VCGStatus.ps1
│ ├── README.md
│ ├── Save-VCGJsonFile.ps1
│ ├── VMware.VCGChecker.psd1
│ └── logger.ps1
├── VMware.VMC.NSXT
│ ├── VMware.VMC.NSXT.psd1
│ └── VMware.VMC.NSXT.psm1
├── VMware.VMC
│ ├── VMware.VMC.psd1
│ └── VMware.VMC.psm1
├── VMware.VMEncryption
│ ├── README.md
│ ├── VMware.VMEncryption.psd1
│ └── VMware.VMEncryption.psm1
├── VMware.VsanEncryption
│ ├── README.md
│ ├── VMware.VsanEncryption.psd1
│ └── VMware.VsanEncryption.psm1
├── VMware.WorkloadManagement
│ ├── VMware.WorkloadManagement.psd1
│ └── VMware.WorkloadManagement.psm1
├── VMware.WorkspaceOneAccess
│ ├── VMware.WorkspaceOneAccess.psd1
│ └── VMware.WorkspaceOneAccess.psm1
├── VMware.vSphere.SsoAdmin
│ ├── AuthenticationPolicy.ps1
│ ├── Connect.ps1
│ ├── Group.ps1
│ ├── IdentitySource.ps1
│ ├── LockoutPolicy.ps1
│ ├── MobConnect.ps1
│ ├── PasswordPolicy.ps1
│ ├── PersonUser.ps1
│ ├── README.md
│ ├── TokenLifetime.ps1
│ ├── VMware.vSphere.SsoAdmin.psd1
│ ├── VMware.vSphere.SsoAdmin.psm1
│ ├── net45
│ │ ├── VMware.vSphere.LsClient.dll
│ │ ├── VMware.vSphere.SsoAdmin.Format.ps1xml
│ │ ├── VMware.vSphere.SsoAdmin.Utils.dll
│ │ ├── VMware.vSphere.SsoAdmin.psd1
│ │ └── VMware.vSphere.SsoAdminClient.dll
│ ├── netcoreapp3.1
│ │ ├── VMware.vSphere.LsClient.dll
│ │ ├── VMware.vSphere.SsoAdmin.Format.ps1xml
│ │ ├── VMware.vSphere.SsoAdmin.Utils.dll
│ │ ├── VMware.vSphere.SsoAdmin.psd1
│ │ └── VMware.vSphere.SsoAdminClient.dll
│ └── src
│ │ ├── .gitignore
│ │ ├── VMware.vSphere.SsoAdmin.Client
│ │ ├── Nuget.config
│ │ ├── VMware.vSphere.LsClient
│ │ │ ├── Connected Services
│ │ │ │ └── LookupServiceReference
│ │ │ │ │ ├── ConnectedService.json
│ │ │ │ │ └── Reference.cs
│ │ │ ├── LookupServiceClient.cs
│ │ │ └── VMware.vSphere.LsClient.csproj
│ │ ├── VMware.vSphere.SsoAdmin.Client.sln
│ │ ├── VMware.vSphere.SsoAdmin.Utils
│ │ │ ├── AcceptAllX509CertificateValidator.cs
│ │ │ ├── StringToSecureStringArgumentTransformationAttribute.cs
│ │ │ ├── StringToSsoAdminServerArgumentTransformationAttribute.cs
│ │ │ └── VMware.vSphere.SsoAdmin.Utils.csproj
│ │ ├── VMware.vSphere.SsoAdminClient.Tests
│ │ │ ├── IntegrationTests.cs
│ │ │ └── VMware.vSphere.SsoAdminClient.Tests.csproj
│ │ ├── VMware.vSphere.SsoAdminClient
│ │ │ ├── DataTypes
│ │ │ │ ├── ActiveDirectoryIdentitySource.cs
│ │ │ │ ├── AuthenticationPolicy.cs
│ │ │ │ ├── Group.cs
│ │ │ │ ├── IdentitySource.cs
│ │ │ │ ├── LocalOSIdentitySource.cs
│ │ │ │ ├── LockoutPolicy.cs
│ │ │ │ ├── PasswordPolicy.cs
│ │ │ │ ├── PersonUser.cs
│ │ │ │ ├── SsoAdminServer.cs
│ │ │ │ ├── SystemIdentitySource.cs
│ │ │ │ └── TokenLifetime.cs
│ │ │ ├── SsoAdminClient.cs
│ │ │ ├── SsoAdminServiceReference
│ │ │ │ └── Reference.cs
│ │ │ ├── UserPassSecurityContext.cs
│ │ │ └── VMware.vSphere.SsoAdminClient.csproj
│ │ └── packages
│ │ │ ├── VMware.Binding.Sts.12.0.0.15939652.nupkg
│ │ │ ├── VMware.Binding.Sts.12.0.0.15939652.symbols.nupkg
│ │ │ ├── VMware.Binding.WsTrust.12.0.0.15939652.nupkg
│ │ │ ├── VMware.Binding.WsTrust.12.0.0.15939652.symbols.nupkg
│ │ │ ├── VMware.Http.Handlers.12.0.0.15939652.nupkg
│ │ │ ├── VMware.Http.Handlers.12.0.0.15939652.symbols.nupkg
│ │ │ ├── VMware.System.Private.ServiceModel.4.4.4.nupkg
│ │ │ ├── VMware.Util.Sspi.12.0.0.15939652.nupkg
│ │ │ └── VMware.Util.Sspi.12.0.0.15939652.symbols.nupkg
│ │ ├── build.ps1
│ │ ├── resources
│ │ └── powercli.png
│ │ └── test
│ │ ├── AuthenticationPolicy.Tests.ps1
│ │ ├── ConnectDisconnect.Tests.ps1
│ │ ├── Group.Tests.ps1
│ │ ├── IdentitySource.Tests.ps1
│ │ ├── LockoutPolicy.Tests.ps1
│ │ ├── LsClient.Tests.ps1
│ │ ├── PasswordPolicy.Tests.ps1
│ │ ├── PersonUser.Tests.ps1
│ │ ├── RunTests.ps1
│ │ └── TokenLifetime.Tests.ps1
├── VMwareCloudPartnerNavigator
│ └── navigator.psm1
├── Validate-ESXiPackages
│ └── Validate-ESXiPackages.psm1
├── Vi-Module
│ ├── README.md
│ ├── Vi-Module.psd1
│ └── Vi-Module.psm1
├── VyOS
│ ├── VyOS.psm1
│ └── vyos.template
├── apply-hardening
│ └── apply-hardening.psm1
├── rCisTag
│ ├── Examples
│ │ ├── 01-Get.ps1
│ │ ├── 02-New.ps1
│ │ ├── 03-Set.ps1
│ │ ├── 04-Remove.ps1
│ │ ├── 05-Tag-Datastore.ps1
│ │ └── CisConfig.ps1
│ ├── MITLicense.txt
│ ├── README.md
│ ├── en-US
│ │ ├── about_rCISTag.Help.txt
│ │ └── rCISTag-help.xml
│ ├── rCISTag.psd1
│ └── rCISTag.psm1
├── vCenter.Alarms
│ ├── New-vCenterAlarms.ps1
│ └── vCenter.Alarms.psm1
├── vCenterCEIP
│ └── vCenterCEIP.psm1
├── vCenterManualMigration
│ └── vCenterManualMigration.psm1
└── vSphere_Hardening_Assess_VM_v1a
│ └── vSphere_Hardening_Assess_VM_v1a.psm1
├── NOTICE.txt
├── Pester
├── 00 Test Connect-CISServer Connection to VC.Tests.ps1
├── 00 Test Connect-VIServer Connection to VC.Tests.ps1
├── Functions
│ ├── Connect-VMCVIServer.tests.ps1
│ ├── Get-VMCCommand.tests.ps1
│ ├── Get-VMCFirewallRule.tests.ps1
│ ├── Get-VMCHost.tests.ps1
│ ├── Get-VMCOrg.tests.ps1
│ ├── Get-VMCSDDCDefaultCredential.tests.ps1
│ ├── Get-VMCSDDCPublicIP.tests.ps1
│ ├── Get-VMCSDDCVersion.tests.ps1
│ ├── Get-VmcSddc.tests.ps1
│ ├── Get-VmcTask.tests.ps1
│ └── Shared.ps1
├── Get-DatastoreProvisioned.Tests.ps1
├── Test Get-CISService.Tests.ps1
├── VMCCode-Coverage.ps1
├── ZZ Test Disconnect-CISServer to VC.Tests.ps1
└── ZZ Test Disconnect-VIServer to VC.Tests.ps1
├── PowerActions
├── Example - ClusterSnapshotsReport.ps1
├── Example - RemoveOldClusterSnapshots.ps1
├── Git Sync.ps1
├── README.md
├── VM-CdDrive-Report.ps1
└── VM-Snapshot-Report.ps1
├── README.md
├── Scripts
├── Apply-OMRightsizing.ps1
├── At_Your_Fingertips
│ ├── NewProfile.ps1
│ └── install-profile.ps1
├── AutomaticVMFSUnmap.ps1
├── Check-VMwareTools.ps1
├── Copy-NsxIpsetsv2t.ps1
├── CreateVLANonStandardSwitch
├── DatastoreSIOCStatistics.ps1
├── Demo
│ └── CallAPIsWithPowerCLI.ps1
├── ESXInstallDate.ps1
├── ESXInstalledVIBs.ps1
├── ExportImportTags.ps1
├── FindVSphereCommand
│ ├── FindVSphereCommand.Format.ps1xml
│ ├── FindVSphereCommand.psd1
│ ├── FindVSphereCommand.psm1
│ └── Readme.md
├── Get-BasicVMCapacityReport
├── Get-BiosBootStatus.ps1
├── Get-CIVMData.ps1
├── Get-DatastoreProvisioned.ps1
├── Get-Migrations.ps1
├── Get-TotalDiskUsage.ps1
├── Get-TotalMemoryAllocation.ps1
├── Get-TriggeredAlarm.ps1
├── Get-VMHostUplinkDetails.ps1
├── Get-VMHostWWPN.ps1
├── Get-VMID.ps1
├── Get-VMNetworkPortId.ps1
├── Get-VMSnapshotReport.ps1
├── Get-VMToolsParts.ps1
├── Get-VsanHclDatabase.ps1
├── Home Lab
│ ├── Home Lab Delete settings.ps1
│ └── Home Lab Deployment.ps1
├── Horizon View Example Desktop Script.ps1
├── Horizon-GetUsageStats.ps1
├── Host_Memory_Assessment_Tool.ps1
├── Install-HostClient.ps1
├── Invoke-BiosBoot.ps1
├── Move-DatastoreCluster.ps1
├── NVME Info.ps1
├── New-ClusterHostGroup.ps1
├── New-ClusterVmGroup.ps1
├── New-ClusterVmHostRule.ps1
├── PAIF-N
│ ├── 01-deploy-vcf-workload-domain.ps1
│ ├── 02-install-nvidia-driver-vlcm.ps1
│ ├── 03-deploy-edge-cluster.ps1
│ ├── 04-enable-wcp.ps1
│ ├── README.md
│ └── utils
│ │ ├── Wait-VcfTask.ps1
│ │ └── Wait-VcfValidation.ps1
├── PowerCLI_FixNestedFolders.ps1
├── README.md
├── ReadVMSnapshotConfig.ps1
├── Remove-HostClient.ps1
├── Remove-IPPool.ps1
├── Report-LUNPath-ESXCLI.ps1
├── Sample VMC firewall rules management.ps1
├── Save-PowerCLI.ps1
├── SecureBoot.ps1
├── Set-ClusterDpm.ps1
├── Set-CustomAttributesInGuestinfo.ps1
├── Set-LockdownLevel.ps1
├── Set-NetworkAdapterOpaqueNetwork.ps1
├── Set-TagsInGuestinfo.ps1
├── Set-VMHostSecureNTP.ps1
├── SetClusterMultiPathToRoundRobin.ps1
├── SetDatastoreTag.ps1
├── SetLunReservation.ps1
├── SetMultiPathToRoundRobin
├── Start-VMHostSsh.ps1
├── Stop-VMHostSsh.ps1
├── Sysprep_Automation_Script.ps1
├── Update_PowerCLI_Scripts.ps1
├── VMware_Cloud_on_AWS
│ ├── AWS_Integrations_Examples
│ │ ├── Serverless_VM_Deployment
│ │ │ ├── index.html
│ │ │ ├── readme.txt
│ │ │ └── vm-request-form.zip
│ │ └── Slack_Inventory
│ │ │ ├── slackinventory.py
│ │ │ └── vmc-inventory-to-slack.mp4
│ ├── Create100VMs.ps1
│ ├── L2VPN-vMotion-OnPrem-to-VMC.ps1
│ ├── VMC Example Script.ps1
│ ├── VMWonAWS_1nodeDeployment.ps1
│ ├── VMWonAWS_FirewallRuleAccelerator.ps1
│ ├── VMWonAWS_InviteUsers.ps1
│ └── XRef-VMC-Services.ps1
├── VSANSmartsData.ps1
├── VSANVersion.ps1
├── backup-esxi-host-configuration.ps1
├── esxi-image-comparator.ps1
├── esxi-image-creator.ps1
├── get-peakvms.ps1
├── get-ping.ps1
├── ha-vcenter-deploy-template.json
├── ha-vcenter-deploy.ps1
├── modules.sh
├── vCenterSnapshot.ps1
├── vRealize Operations Maintenance Mode.ps1
├── vSphereLogins.ps1
├── vTool_2016aug.ps1
├── vlcm-sample-cmdlets
│ └── vLCM-cmdlets.ps1
└── vmCreationNotes.ps1
└── resources
├── powercli-psgallery-icon.svg
├── vmw-ico-powercli-vmc-rgb_16px.svg
├── vmw-ico-powercli-vmc-rgb_400px.svg
└── vmw-prod-icon-powercli_vert.svg
/.gitattributes:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/.gitattributes
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # PowerShell Studio Files
2 | *.temppoint.*
3 | *.psproj.psbuild
4 | *.psbuild
5 |
6 | #VS Code Files
7 | *.vscode
8 | /.vs
9 |
10 | # Windows image file caches
11 | Thumbs.db
12 | ehthumbs.db
13 |
14 | # Folder config file
15 | Desktop.ini
16 |
17 | # Recycle Bin used on file shares
18 | $RECYCLE.BIN/
19 |
20 | # Windows Installer files
21 | *.cab
22 | *.msi
23 | *.msm
24 | *.msp
25 |
26 | # Windows shortcuts
27 | *.lnk
28 |
29 | # =========================
30 | # Operating System Files
31 | # =========================
32 |
33 | # OSX
34 | # =========================
35 |
36 | .DS_Store
37 | .AppleDouble
38 | .LSOverride
39 |
40 | # Thumbnails
41 | ._*
42 |
43 | # Files that might appear on external disk
44 | .Spotlight-V100
45 | .Trashes
46 |
47 | # Directories potentially created on remote AFP share
48 | .AppleDB
49 | .AppleDesktop
50 | Network Trash Folder
51 | Temporary Items
52 | .apdisk
53 | /Modules/VMware.vSphere.SsoAdmin/ForPSGallery/VMware.vSphere.SsoAdmin
54 |
--------------------------------------------------------------------------------
/DSC/README.md:
--------------------------------------------------------------------------------
1 | DSC Resources
2 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | PowerCLI-Example-Scripts
2 | Copyright 2021 VMware, Inc.
3 |
4 | BSD 2-Clause License
5 |
6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 |
--------------------------------------------------------------------------------
/Modules/NSXT/NSXT.psd1:
--------------------------------------------------------------------------------
1 | <#
2 | Copyright 2021 VMware, Inc.
3 | SPDX-License-Identifier: BSD-2-Clause
4 | #>
5 | @{
6 | ModuleToProcess = 'NSXT.psm1'
7 | ModuleVersion = '1.0.0.0'
8 | GUID = 'c72f4e3d-5d1d-498f-ba86-6fa03e4ae6dd'
9 | Author = 'William Lam'
10 | CompanyName = 'primp-industries.com'
11 | Copyright = '(c) 2017. All rights reserved.'
12 | Description = 'Powershell Module for NSX-T REST API Functions'
13 | PowerShellVersion = '5.0'
14 | FunctionsToExport = 'Get-NSXTBGPNeighbors',
15 | 'Get-NSXTComputeManager',
16 | 'Get-NSXTController',
17 | 'Get-NSXTEdgeCluster',
18 | 'Get-NSXTFabricNode',
19 | 'Get-NSXTFabricVM',
20 | 'Get-NSXTFirewallRule',
21 | 'Get-NSXTForwardingTable',
22 | 'Get-NSXTIPPool',
23 | 'Get-NSXTLogicalRouter',
24 | 'Get-NSXTLogicalRouterPorts',
25 | 'Get-NSXTLogicalSwitch',
26 | 'Get-NSXTManager',
27 | 'Get-NSXTNetworkRoutes',
28 | 'Get-NSXTRoutingTable',
29 | 'Get-NSXTTraceFlow',
30 | 'Get-NSXTTraceFlowObservations',
31 | 'Get-NSXTTransportNode',
32 | 'Get-NSXTTransportZone',
33 | 'Get-NSXTClusterNode',
34 | 'Set-NSXTIPPool',
35 | 'Set-NSXTLogicalRouter',
36 | 'Set-NSXTLogicalSwitch',
37 | 'Set-NSXTTraceFlow',
38 | 'Get-NSXTIPAMIPBlock',
39 | 'Set-NSXTIPAMIPBlock',
40 | 'Remove-NSXTIPAMIPBlock'
41 |
42 |
43 | PrivateData = @{
44 | PSData = @{
45 | Tags = @('NSX-T','REST')
46 | LicenseUri = 'https://www.tldrlegal.com/l/mit'
47 | ProjectUri = 'https://github.com/lamw/PowerCLI-Example-Scripts/tree/master/Modules/NSXT'
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/Modules/README.md:
--------------------------------------------------------------------------------
1 | Modules
2 |
--------------------------------------------------------------------------------
/Modules/SRM/.gitattributes:
--------------------------------------------------------------------------------
1 | *.psd1 diff
2 |
--------------------------------------------------------------------------------
/Modules/SRM/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
--------------------------------------------------------------------------------
/Modules/SRM/Examples/SrmTagging.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | Copyright 2017-2021 VMware, Inc.
3 | SPDX-License-Identifier: Apache-2.0
4 | #>
5 | <#
6 | Copyright 2021 VMware, Inc.
7 | SPDX-License-Identifier: BSD-2-Clause
8 | #>
9 |
10 | # Depends on SRM Helper Methods - https://github.com/benmeadowcroft/SRM-Cmdlets
11 | # It is assumed that the connections to active VC and SRM Server have already been made
12 |
13 | Import-Module Meadowcroft.SRM -Prefix Srm
14 |
15 | $TagCategoryName = 'Meadowcroft.SRM.VM'
16 | $TagCategoryDescription = 'Tag category for tagging VMs with SRM state'
17 |
18 | # If the tag category doesn't exist, create it and the relevant tags
19 | $TagCategory = Get-TagCategory -Name $TagCategoryName -ErrorAction SilentlyContinue
20 | if (-Not $TagCategory) {
21 | Write-Output "Creating Tag Category $TagCategoryName"
22 | $TagCategory = New-TagCategory -Name $TagCategoryName -Description $TagCategoryDescription -EntityType 'VirtualMachine'
23 |
24 | Write-Output "Creating Tag SrmProtectedVm"
25 | New-Tag -Name 'SrmProtectedVm' -Category $TagCategory -Description "VM protected by VMware SRM"
26 | Write-Output "Creating Tag SrmTestVm"
27 | New-Tag -Name 'SrmTestVm' -Category $TagCategory -Description "Test VM instantiated by VMware SRM"
28 | Write-Output "Creating Tag SrmPlaceholderVm"
29 | New-Tag -Name 'SrmPlaceholderVm' -Category $TagCategory -Description "Placeholder VM used by VMware SRM"
30 | }
31 |
32 | $protectedVmTag = Get-Tag -Name 'SrmProtectedVm' -Category $TagCategory
33 | $testVmTag = Get-Tag -Name 'SrmTestVm' -Category $TagCategory
34 | $placeholderVmTag = Get-Tag -Name 'SrmPlaceholderVm' -Category $TagCategory
35 |
36 | # Assign protected tag to a VM, use ready state to get "local" protected VMs
37 | Get-SrmProtectedVM -State Ready | %{ New-TagAssignment -Tag $protectedVmTag -Entity $(Get-VIObjectByVIView $_.Vm) | Out-Null }
38 |
39 | # Assign test tag to a VM
40 | Get-SrmTestVM | %{ New-TagAssignment -Tag $testVmTag -Entity $_ | Out-Null }
41 |
42 | # Assign placeholder tag to a VM
43 | Get-SrmPlaceholderVM | %{ New-TagAssignment -Tag $placeholderVmTag -Entity $_ | Out-Null }
44 |
--------------------------------------------------------------------------------
/Modules/SRM/Meadowcroft.Srm.Storage.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | Copyright 2017-2021 VMware, Inc.
3 | SPDX-License-Identifier: Apache-2.0
4 | #>
5 | <#
6 | Copyright 2021 VMware, Inc.
7 | SPDX-License-Identifier: BSD-2-Clause
8 | #>
9 |
10 | # SRM Helper Methods - https://github.com/benmeadowcroft/SRM-Cmdlets
11 |
12 | <#
13 | .SYNOPSIS
14 | Trigger Discover Devices for Site Recovery Manager
15 |
16 | .OUTPUTS
17 | Returns discover devices task
18 | #>
19 | Function Start-DiscoverDevice {
20 | [cmdletbinding(SupportsShouldProcess=$True, ConfirmImpact="Medium")]
21 | [OutputType([VMware.VimAutomation.Srm.Views.DiscoverDevicesTask])]
22 | Param(
23 | [VMware.VimAutomation.Srm.Types.V1.SrmServer] $SrmServer
24 | )
25 |
26 | $api = Get-ServerApiEndpoint -SrmServer $SrmServer
27 | $name = $SrmServer.Name
28 | [VMware.VimAutomation.Srm.Views.DiscoverDevicesTask] $task = $null
29 | if ($pscmdlet.ShouldProcess($name, "Rescan Storage Devices")) {
30 | $task = $api.Storage.DiscoverDevices()
31 | }
32 | return $task
33 | }
34 |
--------------------------------------------------------------------------------
/Modules/SRM/NOTICE.txt:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) 2017-2021 VMware, Inc. All Rights Reserved.
3 |
4 | This product is licensed to you under the Apache License version 2.0 (the "License"). You may not use this product except in compliance with the License.
5 |
6 | This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
7 |
8 | Copyright (c) 2021 VMware, Inc. All Rights Reserved.
9 |
10 | This product is licensed to you under the BSD-2-Clause License. You may not use this product except in compliance with the License.
11 |
--------------------------------------------------------------------------------
/Modules/SaltStackConfig/SaltStackConfig.Format.ps1xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SscConnection
6 |
7 | SscConnection
8 |
9 |
10 |
11 |
12 | 30
13 |
14 |
15 |
16 | 30
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Name
28 |
29 |
30 | User
31 |
32 |
33 | Authenticated
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Modules/VISecret/README.md:
--------------------------------------------------------------------------------
1 | # Example module for using SecretManagement and SecretStore to save PowerCLI credentials
2 |
3 |
4 |
5 | This module demonstrates how users can use the the Microsoft.PowerShell.SecretManagement and Microsoft.PowerShell.SecretStore modules to save their PowerCLI credentials.
6 |
7 | The module supports PowerShell 5.1 and PowerShell 7.0 and above.
--------------------------------------------------------------------------------
/Modules/VMFSIncrease/LICENSE.txt.URL:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=https://github.com/lucdekens/LogInsight/blob/v1.0/LICENSE.txt
3 | IDList=
4 | HotKey=0
5 | IconFile=C:\Users\ldekens\AppData\Local\Mozilla\Firefox\Profiles\2ahnnh1i.default\shortcutCache\ec4nFcIEAQBPFmSiPtTJ2w==.ico
6 | IconIndex=0
7 |
--------------------------------------------------------------------------------
/Modules/VMFSIncrease/VMFSIncrease.psd1:
--------------------------------------------------------------------------------
1 | @{
2 | ModuleToProcess = 'VMFSIncrease.psm1'
3 | ModuleVersion = '1.0.0.0'
4 | GUID = '9f167385-c5c6-4a65-ac14-949c67519001'
5 | Author = 'Luc Dekens '
6 | CompanyName = 'Community'
7 | Copyright = '(c) 2016. All rights reserved.'
8 | Description = 'Expand and Extend VMFS DatastoresModule description'
9 | PowerShellVersion = '3.0'
10 | FunctionsToExport = 'Get-VmfsDatastoreInfo','Get-VmfsDatastoreIncrease','New-VmfsDatastoreIncrease'
11 | PrivateData = @{
12 | PSData = @{
13 | Tags = @('VMFS','Expand','Extend','vSphere')
14 | LicenseUri = 'https://www.tldrlegal.com/l/mit'
15 | ProjectUri = 'https://github.com/lucdekens/VMFSIncrease'
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Modules/VMFSIncrease/en-US/about_VMFSIncrease.help.txt:
--------------------------------------------------------------------------------
1 | TOPIC
2 | VMFSIncrease
3 |
4 | SYNOPSIS
5 | The VMFSIncrease module offers the same functionality that is available
6 | through the Increase button in the vSphere Web Client.
7 |
8 | DESCRIPTION
9 | The VMFSIncrease offers functionality that allows to Expand or Extend
10 | VMFS Datastores. The module uses the vSphere API to implement this functionality.
11 |
12 | SEE ALSO
13 | http://www.lucd.info/2016/07/29/vmfs-datastores-expand-and-extend
14 |
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Markus Kraus
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/README.md:
--------------------------------------------------------------------------------
1 | VMware-vCD-Module PowerShell Module
2 | ===================================
3 |
4 | 
5 |
6 | # About
7 |
8 | ## Project Owner:
9 |
10 | Markus Kraus [@vMarkus_K](https://twitter.com/vMarkus_K)
11 |
12 | MY CLOUD-(R)EVOLUTION [mycloudrevolution.com](http://mycloudrevolution.com/)
13 |
14 |
15 | ## Project WebSite:
16 | [PowerCLI vCloud Director Customer Provisioning](https://mycloudrevolution.com/2017/06/13/powercli-vcloud-director-customer-provisioning/)
17 |
18 | [PowerCLI – Create vCloud Director Edge Gateway](https://mycloudrevolution.com/2017/06/27/powercli-create-vcloud-director-edge-gateway/)
19 |
20 |
21 | ## Project Documentation:
22 |
23 | [Read the Docs - VMware-vCD-Module](http://vmware-vcd-module.readthedocs.io/)
24 |
25 | ## Project Description:
26 |
27 | The 'VMware-vCD-Module' PowerShell Module is focused on the initial creation of VMware vCloud Director Objects like Org, Org User, Org VDC with External Networks or Edge Gateway.
28 |
29 | All Functions in this Module can be used as standalone Cmdlet but also the ``Invoke-My OnBoarding`` Functions to process a JSON File and create all Objects at once.
30 |
31 | ### Fully tested Versions:
32 |
33 | Powershell: v4, v5
34 |
35 | PowerCLI: 6.5.1
36 |
37 | VMware vCloud Director: 8.10.1
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/examples/OnBoarding.json:
--------------------------------------------------------------------------------
1 | {
2 | "Org": {
3 | "Name":"TestOrg",
4 | "FullName": "Test Org",
5 | "Description":"Automation Test Org"
6 | },
7 | "OrgAdmin": {
8 | "Name":"TestOrgAdmin",
9 | "Pasword": "myPassword1!",
10 | "FullName":"Test OrgAdmin",
11 | "EmailAddress":"test@admin.org"
12 | },
13 | "OrgVdc": {
14 | "Name":"TestOrgVdc",
15 | "FixedSize": "M",
16 | "CPULimit": "1000",
17 | "MEMLimit":"1024",
18 | "StorageLimit":"1024",
19 | "StorageProfile":"Standard-DC01",
20 | "ProviderVDC":"Provider-VDC-DC01",
21 | "NetworkPool":"Provider-VDC-DC01-NetPool",
22 | "ExternalNetwork": "External-OrgVdcNet",
23 | "EdgeGateway": "Yes",
24 | "IPAddress":"192.168.100.1",
25 | "SubnetMask":"255.255.255.0",
26 | "Gateway":"192.168.100.254",
27 | "IPRangeStart":"192.168.100.2",
28 | "IPRangeEnd":"192.168.100.3"
29 | }
30 | }
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/media/Invoke-MyOnBoarding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/Modules/VMware-vCD-Module/media/Invoke-MyOnBoarding.png
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/media/VSCode-Pester-Tests.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/Modules/VMware-vCD-Module/media/VSCode-Pester-Tests.png
--------------------------------------------------------------------------------
/Modules/VMware-vCD-Module/tests/VMware-vCD-Module.Tests.ps1:
--------------------------------------------------------------------------------
1 | $moduleRoot = Resolve-Path "$PSScriptRoot\.."
2 | $moduleName = "VMware-vCD-Module"
3 | $ConfigFile = "$moduleRoot\examples\OnBoarding.json"
4 |
5 | Describe "General project validation: $moduleName" {
6 |
7 | $scripts = Get-ChildItem $moduleRoot -Include *.ps1, *.psm1, *.psd1 -Recurse
8 |
9 | # TestCases are splatted to the script so we need hashtables
10 | $testCase = $scripts | Foreach-Object {@{file = $_}}
11 | It "Script should be valid powershell" -TestCases $testCase {
12 | param($file)
13 |
14 | $file.fullname | Should Exist
15 |
16 | $contents = Get-Content -Path $file.fullname -ErrorAction Stop
17 | $errors = $null
18 | $null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
19 | $errors.Count | Should Be 0
20 | }
21 |
22 | It "Module '$moduleName' prerequirements are met" {
23 | {Import-Module VMware.VimAutomation.Cloud -Force} | Should Not Throw
24 | }
25 |
26 | It "Module '$moduleName' can import cleanly" {
27 | {Import-Module (Join-Path $moduleRoot "$moduleName.psd1") -force } | Should Not Throw
28 | }
29 |
30 | It "Module '$moduleName' JSON example is valid" {
31 | {Get-Content -Raw -Path $ConfigFile | ConvertFrom-Json} | Should Not Throw
32 | }
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Modules/VMware-vCD-TenantReport/README.md:
--------------------------------------------------------------------------------
1 | VMware-vCD-TenantReport PowerShell Module
2 | =============
3 |
4 | # About
5 |
6 | ## Project Owner:
7 |
8 | Markus Kraus [@vMarkus_K](https://twitter.com/vMarkus_K)
9 |
10 | MY CLOUD-(R)EVOLUTION [mycloudrevolution.com](http://mycloudrevolution.com/)
11 |
12 | ## Project WebSite:
13 |
14 | [mycloudrevolution.com](http://mycloudrevolution.com/)
15 |
16 | ## Project Documentation:
17 |
18 | [Read the Docs](http://readthedocs.io/)
19 |
20 | ## Project Description:
21 |
22 | The 'VMware-vCD-TenantReport' PowerShell Module creates with the Fuction 'Get-VcdTenantReport' a HTML Report of your vCloud Director Objects.
23 |
24 | 
25 |
26 | Big thanks to [Timothy Dewin](https://twitter.com/tdewin) for his great [PowerStartHTML](https://github.com/tdewin/randomsamples/tree/master/powerstarthtml) PowerShell Module which is used to generate the Report for this Module.
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Modules/VMware-vCD-TenantReport/media/Get-VcdTenantReport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/Modules/VMware-vCD-TenantReport/media/Get-VcdTenantReport.png
--------------------------------------------------------------------------------
/Modules/VMware-vCD-TenantReport/modules/PowerStartHTML/PowerStartHTML.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/Modules/VMware-vCD-TenantReport/modules/PowerStartHTML/PowerStartHTML.psd1
--------------------------------------------------------------------------------
/Modules/VMware-vCD-TenantReport/tests/VMware-vCD-TenantReport.Tests.ps1:
--------------------------------------------------------------------------------
1 | $moduleRoot = Resolve-Path "$PSScriptRoot\.."
2 | $moduleName = "VMware-vCD-TenantReport"
3 |
4 | Describe "General project validation: $moduleName" {
5 |
6 | $scripts = Get-ChildItem $moduleRoot -Include *.ps1, *.psm1, *.psd1 -Recurse
7 |
8 | # TestCases are splatted to the script so we need hashtables
9 | $testCase = $scripts | Foreach-Object {@{file = $_}}
10 | It "Script should be valid powershell" -TestCases $testCase {
11 | param($file)
12 |
13 | $file.fullname | Should Exist
14 |
15 | $contents = Get-Content -Path $file.fullname -ErrorAction Stop
16 | $errors = $null
17 | $null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
18 | $errors.Count | Should Be 0
19 | }
20 |
21 | It "Module '$moduleName' can import cleanly" {
22 | {Import-Module (Join-Path $moduleRoot "$moduleName.psd1") -force } | Should Not Throw
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Modules/VMware.DRaaS/VMware.DRaaS.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware/PowerCLI-Example-Scripts/097172029b710036232f3937dd7c04bbb6a760ad/Modules/VMware.DRaaS/VMware.DRaaS.psd1
--------------------------------------------------------------------------------
/Modules/VMware.Hosted/VMware.Hosted.psd1:
--------------------------------------------------------------------------------
1 | @{
2 | ModuleToProcess = 'VMware.Hosted.psm1'
3 | ModuleVersion = '1.0.0.0'
4 | GUID = '11393D09-D6B8-4E79-B9BC-247F1BE66683'
5 | Author = 'William Lam'
6 | CompanyName = 'primp-industries.com'
7 | Copyright = '(c) 2017. All rights reserved.'
8 | Description = 'Powershell Module for VMware Fusion 10 REST API'
9 | PowerShellVersion = '5.0'
10 | FunctionsToExport = 'Get-HostedCommand','Connect-HostedServer','Disconnect-HostedServer','Get-HostedVM','Start-HostedVM','Stop-HostedVM','Suspend-HostedVM','Resume-HostedVM','New-HostedVM','Remove-HostedVM','Get-HostedVMSharedFolder','New-HostedVMSharedFolder','Remove-HostedVMSharedFolder','Get-HostedVMNic','Get-HostedNetworks'
11 | PrivateData = @{
12 | PSData = @{
13 | Tags = @('Fusion','REST','vmrest')
14 | LicenseUri = 'https://www.tldrlegal.com/l/mit'
15 | ProjectUri = 'https://github.com/lamw/PowerCLI-Example-Scripts/tree/master/Modules/VMware.Hosted'
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Json/Farm/ManualFarm.json:
--------------------------------------------------------------------------------
1 | {
2 | "Type": "MANUAL",
3 | "Data": {
4 | "Name": "manualFarmTest",
5 | "DisplayName": "manualFarmTest",
6 | "AccessGroup": "Root",
7 | "Description": "Manual PS Test",
8 | "Enabled": null,
9 | "Deleting": false,
10 | "Settings": {
11 | "DisconnectedSessionTimeoutPolicy" : "NEVER",
12 | "DisconnectedSessionTimeoutMinutes" : 1,
13 | "EmptySessionTimeoutPolicy" : "AFTER",
14 | "EmptySessionTimeoutMinutes" : 1,
15 | "LogoffAfterTimeout" : false
16 | },
17 | "Desktop": null,
18 | "DisplayProtocolSettings": {
19 | "DefaultDisplayProtocol" : "PCOIP",
20 | "AllowDisplayProtocolOverride" : false,
21 | "EnableHTMLAccess" : false
22 | },
23 | "ServerErrorThreshold": null,
24 | "MirageConfigurationOverrides": {
25 | "OverrideGlobalSetting" : false,
26 | "Enabled" : false,
27 | "Url" : null
28 | }
29 | },
30 | "AutomatedFarmSpec": null,
31 | "ManualFarmSpec": {
32 | "RdsServers": [
33 | {
34 | "rdsServer": "RDSServer.adviewdev.eng.vmware.com"
35 | }
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Json/Pool/RdsSpec.json:
--------------------------------------------------------------------------------
1 | {
2 | "Base": {
3 | "Name" : "RdsJson",
4 | "DisplayName": "TestRDSPS",
5 | "AccessGroup": "Root",
6 | "Description": "Testing PS"
7 | },
8 | "DesktopSettings": {
9 | "enabled": true,
10 | "deleting": false,
11 | "connectionServerRestrictions": null,
12 | "logoffSettings": null,
13 | "displayProtocolSettings": null,
14 | "flashSettings": {
15 | "quality": "NO_CONTROL",
16 | "throttling": "DISABLED"
17 | },
18 | "mirageConfigurationOverrides": null
19 | },
20 | "Type": "RDS",
21 | "AutomatedDesktopSpec": null,
22 | "ManualDesktopSpec": null,
23 | "RdsDesktopSpec": {
24 | "Farm": "test1"
25 | },
26 | "GlobalEntitlementData": null
27 | }
28 |
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/README.md:
--------------------------------------------------------------------------------
1 | # Prerequisites/Steps to use this module
2 |
3 | 1. This module only works for Horizon product E.g. Horizon 7.0.2 and later.
4 | 2. Install the latest version of Powershell, PowerCLI(6.5) or (later version via psgallery).
5 | 3. Import HorizonView module by running: Import-Module VMware.VimAutomation.HorizonView.
6 | 4. Import "VMware.Hv.Helper" module by running: Import-Module -Name "location of this module" or Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module.
7 | 5. Get-Command -Module "This module Name" to list all available functions or Get-Command -Module 'VMware.Hv.Helper'.
8 |
9 | # Example script to connect ViewAPI service
10 |
11 | ```
12 | Import-Module VMware.VimAutomation.HorizonView
13 |
14 | # Connection to view API service
15 | $hvServer = Connect-HVServer -server
16 | $hvServices = $hvserver.ExtensionData
17 |
18 | # List Connection Servers
19 | $csList = $hvServices.ConnectionServer.ConnectionServer_List()
20 | ```
21 | # Load this module
22 | ```
23 | Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module
24 | Get-Command -Module 'VMware.Hv.Helper'
25 | ```
26 | # Use advanced functions of this module
27 | ```
28 | New-HVPool -spec 'path to InstantClone.json file'
29 | ```
30 |
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVFarm/AutomatedEditFarm.json:
--------------------------------------------------------------------------------
1 | {
2 | "data.description" : "update through edit farm function",
3 | "data.displayName" : "LCFarmTestUpdated1",
4 | "data.displayProtocolSettings.defaultDisplayProtocol" : "PCOIP",
5 | "automatedFarmData.virtualCenterManagedCommonSettings.transparentPageSharingScope" : "FARM"
6 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVFarm/ManualEditFarm.json:
--------------------------------------------------------------------------------
1 | {
2 | "data.description" : "update through edit farm function",
3 | "data.displayName" : "ManualFarmTestUpdated1",
4 | "data.displayProtocolSettings.defaultDisplayProtocol" : "PCOIP"
5 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVGlobalSettings/Set-HVGlobalSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "generalData.clientMaxSessionTimePolicy": "TIMEOUT_AFTER",
3 | "generalData.clientMaxSessionTimeMinutes": 600,
4 | "generalData.clientIdleSessionTimeoutPolicy": "NEVER",
5 | "generalData.clientIdleSessionTimeoutMinutes": null,
6 | "generalData.clientSessionTimeoutMinutes": 1200,
7 | "generalData.desktopSSOTimeoutPolicy": "DISABLE_AFTER",
8 | "generalData.desktopSSOTimeoutMinutes": 15,
9 | "generalData.applicationSSOTimeoutPolicy": "ALWAYS_ENABLED",
10 | "generalData.applicationSSOTimeoutMinutes": null,
11 | "generalData.viewAPISessionTimeoutMinutes": 10,
12 | "generalData.preLoginMessage": null,
13 | "generalData.displayWarningBeforeForcedLogoff": true,
14 | "generalData.forcedLogoffTimeoutMinutes": 5,
15 | "generalData.forcedLogoffMessage": "Your desktop is scheduled for an important update and will shut down in 5 minutes. Please save any unsaved work now",
16 | "generalData.enableServerInSingleUserMode": false,
17 | "generalData.storeCALOnBroker": false,
18 | "generalData.storeCALOnClient": false,
19 | "securityData.reauthSecureTunnelAfterInterruption": true,
20 | "securityData.messageSecurityMode": "ENHANCED",
21 | "securityData.enableIPSecForSecurityServerPairing": true
22 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVPool/AutomatedEditPool.Json:
--------------------------------------------------------------------------------
1 | {
2 | "base.description" : "update through edit pool function",
3 | "base.displayName" : "Henry2DspNm",
4 | "desktopSettings.displayProtocolSettings.defaultDisplayProtocol" : "BLAST",
5 | "automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewStorageAcceleratorSettings.useViewStorageAccelerator" : true,
6 | "automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewStorageAcceleratorSettings.viewComposerDiskTypes" : "OS_DISKS",
7 | "automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewStorageAcceleratorSettings.regenerateViewStorageAcceleratorDays" : 8
8 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVPool/ManualEditPool.json:
--------------------------------------------------------------------------------
1 | {
2 | "base.description" : "update through edit pool",
3 | "base.displayName" : "pooldisp",
4 | "desktopSettings.displayProtocolSettings.defaultDisplayProtocol" : "BLAST",
5 | "manualDesktopData.viewStorageAcceleratorSettings.useViewStorageAccelerator" : true,
6 | "manualDesktopData.viewStorageAcceleratorSettings.viewComposerDiskTypes" : "OS_DISKS",
7 | "manualDesktopData.viewStorageAcceleratorSettings.regenerateViewStorageAcceleratorDays" : 8
8 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/Set-HVPool/RdsEditPool.json:
--------------------------------------------------------------------------------
1 | {
2 | "base.description" : "update through edit pool function",
3 | "base.displayName" : "RDS2DspNm",
4 | "desktopSettings.flashSettings.quality" : "LOW",
5 | "desktopSettings.flashSettings.throttling" : "CONSERVATIVE"
6 | }
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/docs/Disconnect-HVEvent.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: VMware.HV.Helper-help.xml
3 | Module Name: VMware.HV.Helper
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Disconnect-HVEvent
9 |
10 | ## SYNOPSIS
11 | This function is used to disconnect the database connection.
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Disconnect-HVEvent [-HvDbServer] []
17 | ```
18 |
19 | ## DESCRIPTION
20 | This function will disconnect the database connection made earlier during Connect-HVEvent function.
21 |
22 | ## EXAMPLES
23 |
24 | ### EXAMPLE 1
25 | ```
26 | Disconnect-HVEvent -HvDbServer $hvDbServer
27 | ```
28 |
29 | Disconnecting the database connection on $hvDbServer.
30 |
31 | ## PARAMETERS
32 |
33 | ### -HvDbServer
34 | Connection object returned by Connect-HVEvent advanced function.
35 | This is a mandatory input.
36 |
37 | ```yaml
38 | Type: PSObject
39 | Parameter Sets: (All)
40 | Aliases:
41 |
42 | Required: True
43 | Position: 1
44 | Default value: None
45 | Accept pipeline input: False
46 | Accept wildcard characters: False
47 | ```
48 |
49 | ### CommonParameters
50 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
51 |
52 | ## INPUTS
53 |
54 | ## OUTPUTS
55 |
56 | ### None
57 | ## NOTES
58 | | | |
59 | |-|-|
60 | | Author | Paramesh Oddepally. |
61 | | Author email | poddepally@vmware.com |
62 | | Version | 1.1 |
63 |
64 | ===Tested Against Environment====
65 | | | |
66 | |-|-|
67 | | Horizon View Server Version | 7.0.2, 7.1.0 |
68 | | PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
69 | | PowerShell Version | 5.0 |
70 |
71 | ## RELATED LINKS
72 |
--------------------------------------------------------------------------------
/Modules/VMware.Hv.Helper/docs/Get-HVEventDatabase.md:
--------------------------------------------------------------------------------
1 | ---
2 | external help file: VMware.HV.Helper-help.xml
3 | Module Name: VMware.HV.Helper
4 | online version:
5 | schema: 2.0.0
6 | ---
7 |
8 | # Get-HVEventDatabase
9 |
10 | ## SYNOPSIS
11 | Retreives information about the configured Event Database
12 |
13 | ## SYNTAX
14 |
15 | ```
16 | Get-HVEventDatabase [[-HvServer]