locked
New PowerShell User, very complex problem to solve RRS feed

  • General discussion

  • Hello,

    My boss has tasked me with deploying Office 2016 onto our network however, the network is very slow, as in a 4 meg network.

    We have decided we want to package the 2016 install on a USB Drive and ship it to each site to install locally instead of through the internet. 

    As a result, I am trying to figure out how to create a PowerShell script that will allow me to detect what devices are actually at that location, they are not named in AD by location, are they turned on, what version of windows they are running, IE. 64 or x86, silently remove all Office products on one device locally at a time, verify it was removed successfully to a file I can later read, and then install Office 16 from the USB Drive on the one device, verify it installed correctly and write that to the same file previously mentioned and then move to the next device.

    I know this would be much easier with a faster network and or some sort of mass deployment but that is not an option here.

    I have a test environment that I am trying to figure this out on.  Can anyone please offer any help?

    Thanks

    • Changed type Bill_Stewart Wednesday, November 29, 2017 11:48 PM
    • Moved by Bill_Stewart Wednesday, November 29, 2017 11:48 PM Seriously?
    Monday, October 23, 2017 5:37 PM

All replies

  • This will get you most of what you want:

    Get-AdComputer -Filter * |
           ForEAch-Object{
                Get-WmiObject Win32_OperatingSystem -Computer $_.Name
          }
    

    There is no such thing as a 4 Mb network although old DSL link between sits may be slower than that but the above code will be very fast assuming your network is not broken.


    \_(ツ)_/

    Monday, October 23, 2017 5:45 PM
  • This is all I am getting back over and over when I run what you posted.

    SystemDirectory : C:\windows\system32
    Organization    : Our company
    BuildNumber     : 7601
    RegisteredUser  : user1
    SerialNumber    : 55041-007-1772641-86905
    Version         : 6.1.7601

    I was hoping to get a list of computers on the domain by actual yard locations, what version of Windows they are running and then execute another set of commands however, at this point I would love to have the output to a file so I can examine it and then filter them further.

    Monday, October 23, 2017 5:54 PM
  • Get-AdComputer -Filter * |
           ForEach-Object{
                Get-WmiObject Win32_OperatingSystem -Computer $_.Name
          } |
         select *
    

    You will need to learn PowerShell to pursue this further.


    \_(ツ)_/

    Monday, October 23, 2017 6:02 PM
  • This forum is for specific scripting questions; you're basically asking someone to write you an inventory system, which as you can imagine is a bit beyond the scope of a scripting question. There are free tools available on the Internet that can give you hardware and software inventories of remote computers; I suggest you research those.

    -- Bill Stewart [Bill_Stewart]

    Monday, October 23, 2017 8:21 PM