Get-Mailbox doesn’t work in office365 PowerShell invoke-commamd another server session

Sorry let me rephrase that title. I have a script that uses the below (not 100% because I’m not at work to check) to connect to our server that has office365 tools from our on-prem AD server as part of my new user creation script. $O365Session = New-PSSession –ComputerName SRV05 Invoke-Command –Session $O365Session –ScriptBlock {Start-ADSyncSyncCycle […]

PowerCLI: Attaching a vmfstools -z VMDK to a virtual machine

I generated a VMDK using vmfstools -z and now I am trying to attach it, using PowerCLI, to a VM. How can I do this using New-HardDisk? Get-Module -Name VMware* -ListAvailable | Import-Module $viserver=Connect-VIServer -Server -User “user” -Password “pass” $drive = Get-ScsiLun | Where-Object {$_.CanonicalName -like “*123*”}| Select-Object -ExpandProperty ConsoleDeviceName $drive = $drive.Trim() $pass […]