PowerCLI discord

Need help, want to talk about PowerCLi or just bored ?
Discord url:

https://discord.gg/Q593B4C

See you there!

 

4 thoughts on “PowerCLI discord

  1. hi im trying to use the script that called Script to list VM Network

    $reportedvms=New-Object System.Collections.ArrayList
    $vms=get-view -viewtype virtualmachine

    foreach($vm in $vms){
    $reportedvm = New-Object PSObject
    Add-Member -Inputobject $reportedvm -MemberType noteProperty -name Guest -value $vm.Name
    Add-Member -InputObject $reportedvm -MemberType noteProperty -name UUID -value $($vm.Config.Uuid)
    $networkcards=$vm.guest.net
    $i=0
    foreach($ntwkcard in $networkcards){
    Add-Member -InputObject $reportedvm -MemberType NoteProperty -Name “networkcard${i}.Network” -Value $ntwkcard.Network
    Add-Member -InputObject $reportedvm -MemberType NoteProperty -Name “networkcard${i}.MacAddress” -Value $ntwkcard.Macaddress
    Add-Member -InputObject $reportedvm -MemberType NoteProperty -Name “networkcard${i}.IpAddress” -Value $($ntwkcard.IpAddress|?{$_ -like “*.*”})
    Add-Member -InputObject $reportedvm -MemberType NoteProperty -Name “networkcard${i}.Device” -Value $(($vm.config.hardware.device|?{$_.key -eq $($ntwkcard.DeviceConfigId)}).gettype().name)
    $i++
    }
    $reportedvms.add($reportedvm)|Out-Null
    }

    $reportedvms|Export-Csv c:\test.csv

    #### bu i always get the following in my CSV , please help mt to solve it 🙂

    UUID
    420a1b4e-e5ae-f599-3a45-9484d0c558f8
    420abd79-6e74-288b-5600-8c7af649a410
    420a19d4-8902-33b1-1bba-a577ea680831
    420a5595-38b2-53bd-c4ee-6af8ddb022c1

  2. Hi, I am using system center orchestrator and attempting to call powercli via .net script module.
    I run the following
    Add-PSSnapin VMware.VimAutomation.Core
    connect-viserver -server IPv6_address -User Username -Password password

    I keep receiving that it fails, reporting that “the term connect-viserver is not recognized”
    Any ideas as to were I am screwing up?

  3. Hi I’m trying to modify the IIS header setting and getting below error.

    c:\Windows\System32\inetsrv>appcmd.exe set config /section:system.webServer/http
    Protocol /+”customHeaders.[name=’Content-Security-Policy’,value= default-src htt
    ps: data: ‘unsafe-inline’ ‘unsafe-eval’]”

    ERROR ( message:Malformed collection indexer; format is [@position,name=’value’,
    name2=’value2′,…]. The @position specifier is optional, and be ‘@start’, ‘@en
    d’, or ‘@N’ where N is a numeric index into the collection. )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s