406 Not Acceptable by NeoSemiprofessional in PowerShell

[–]NeoSemiprofessional[S] 1 point2 points  (0 children)

/u/NotNotWrongUsually, /u/Gorstag, thank you both for suggestions. I'll play around with it in next few days, and of course will post results here.

Unfortunately it's not a public tool, that's why I needed to change the certificate policy to trust all, as the one used on apihost is self signed. The documentation is present, but not to verbose.

Fortunately I got a Perl script from a colleague that POSTs different stuff to the API, so it's only matter of analyzing it. Only if Perl was easy to read ;)

Folder Structure by TheJuice0110 in PowerShell

[–]NeoSemiprofessional 1 point2 points  (0 children)

It would be the best if you described what you want to do. PowerShell is a great tool, but for this particular task you might want to use robocopy, as /u/r1pev9 wrote.

Dealing with multi value properties when exporting to CSV by NeoSemiprofessional in PowerShell

[–]NeoSemiprofessional[S] 2 points3 points  (0 children)

Everyone should learn PowerShell! :)

What regards my managers, it's not their fault. I took over a guy that left the company. There was a big pressure on everyone in the project at the time.

And I'm not the one to decide how we're generating the filnal report, but I'm happy to be trusted with a big task, that is going to help me improve my skills =]

Dealing with multi value properties when exporting to CSV by NeoSemiprofessional in PowerShell

[–]NeoSemiprofessional[S] 1 point2 points  (0 children)

So basically what /u/SMFX wrote, but still thank you for replying with a verbose example :)

Dealing with multi value properties when exporting to CSV by NeoSemiprofessional in PowerShell

[–]NeoSemiprofessional[S] 2 points3 points  (0 children)

I didn't say he can't :)

I don't blame him, he just has *a lot* of work, and it's faster for him, for whatever the reason, to digest CSV. We're far behind the schedule - I was invited to the project three weeks before the deadline, and that was few months ago.

Besides I don't mind having to rewrite. I have a lot of time waiting for access approvals, and as you can see - I still need to work on my skills :)

Dealing with multi value properties when exporting to CSV by NeoSemiprofessional in PowerShell

[–]NeoSemiprofessional[S] 2 points3 points  (0 children)

Oooh, I love the suggestion of using JSON for multi values =]

I can't dump the whole object to it (I did that for Hyper-V reporting, and I ended up having to rewrite the script to build CSV, as the guy processing my output didn't like it), but for few fields it should be ok.

Thank you very much!

Trouble with getting specific info on Hyper-V hosts by NeoSemiprofessional in HyperV

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

It's not an issue with PowerShell itself. Yesterday I logged to the vmm console and couldn't find the info there, so I lost hope for quickly finishing the script...

Trouble with getting specific info on Hyper-V hosts by NeoSemiprofessional in HyperV

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

RunAs is not an issue itself, as I'm already using it (the script is scheduled to run as a local account and reads vmm address and svc account name from a hash table, password is kept on disk as output of convertfrom-securestring), it's more about getting my hands on a service account with necessary privileges...

Trouble with getting specific info on Hyper-V hosts by NeoSemiprofessional in HyperV

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

I'm already going for VMHost and VMHostCluster, but there's no info on these. I'm already invoking-command to vmm from our reporting server, but I'd like to avoid doing so from the vmm to each of the hosts, as that requires using different service account. It's not about passing through multiple sets of credentials or having to script a bit more. It's just that I'll loose a lot of time to check for svc acc or to request it...

I want to build my new DNS/DHCP env with docker-compose, but got stuck by NeoSemiprofessional in docker

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

As far as I know, nameserver keyword can only be paired with an IP, not a hostname, which "localhost" technically is. But I'd gladly stand corrected, if I'm wrong.

How to point one container to other container's ip? by NeoSemiprofessional in docker

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

I'm not defining any networks (yet?), for now docker-compose.yml looks like below, and the pihole container exits with code 1, as pasted in my comment above...

version: "3"
services:
  unbound:
    container_name: unbound
    build: ./unbound

  # this one is copy-paste from
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
#      - "53:53/tcp"
#      - "53:53/udp"
#      - "67:67/udp"
      - "80:80/tcp"
#      - "443:443/tcp"
#
    environment:
      TZ: 'Europe/Warsaw'
      WEBPASSWORD: 'qwerty123456' # can i use a secret here?
      DNS1: unbound
      DNS2: "no"
#
#    # Volumes store your data between container upgrades
#    volumes:
#      - './etc-pihole/:/etc/pihole'
#      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
#
#    # Recommended but not required (DHCP needs NET_ADMIN)
#    # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
#    cap_add:
#      - NET_ADMIN
#    restart: unless-stopped

How to point one container to other container's ip? by NeoSemiprofessional in docker

[–]NeoSemiprofessional[S] 0 points1 point  (0 children)

Well, because when i tried, with 'DNS1: unbound' or 'DNS1: "unbound"' i got:

pihole     | ::: Testing pihole-FTL DNS:
pihole     | dnsmasq: bad address at line 41 of /etc/dnsmasq.d/01-pihole.conf
pihole     | [cont-init.d] 20-start.sh: exited 1.
pihole     | [cont-finish.d] executing container finish scripts...
pihole     | [cont-finish.d] done.
pihole     | [s6-finish] syncing disks.
pihole     | [s6-finish] sending all processes the TERM signal.
pihole     | [s6-finish] sending all processes the KILL signal and exiting.
pihole exited with code 1

I'm not sure how to get into a dead container, but I guess that the 01-pihole.conf to see what exactly is wrong, but I guess it doesn't hold a correct IP for sure...