You likely don't have access to that server.
Run this at a command prompt:
Get-WmiObject win32_operatingsystem -ComputerName 'hardcodedservernamehere'
Script Packager
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
I can open the package ps1 file that is generated from the build and put it in Powershell ISE and when I run it, the gui comes up and runs great. The problem exists only if I try to run the exe.
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
I summarize:
The PSF you provided:
1 - The exe works great from my desktop and pulls my "desktop" reboot time.
2 - If I modify the PSF you provided to get a "Server" Reboot time and rebuild, it doesn't return the reboot time.
The PSF that I've built:
1 - The exe works great if I run to return my "desktop" reboot time.
2 - The exe doesn't return any results if I put in a "Server" name.
3 - I can take the package.PS1 code from the build and paste it in Powershell ISE, run it, and the gui comes up, and "bingo"... it pulls in the Server reboot time.
It's not failing with any errors, it's just not returning the "server" reboot time when I run the exe. It just returns the text saying, "here are the results"
My number 3 above is a key point that it's not that I can't reach the server.
Thanks for you effort in this. I know it's frustrating and certainly is for me as well. Seems so simple.
The PSF you provided:
1 - The exe works great from my desktop and pulls my "desktop" reboot time.
2 - If I modify the PSF you provided to get a "Server" Reboot time and rebuild, it doesn't return the reboot time.
The PSF that I've built:
1 - The exe works great if I run to return my "desktop" reboot time.
2 - The exe doesn't return any results if I put in a "Server" name.
3 - I can take the package.PS1 code from the build and paste it in Powershell ISE, run it, and the gui comes up, and "bingo"... it pulls in the Server reboot time.
It's not failing with any errors, it's just not returning the "server" reboot time when I run the exe. It just returns the text saying, "here are the results"
My number 3 above is a key point that it's not that I can't reach the server.
Thanks for you effort in this. I know it's frustrating and certainly is for me as well. Seems so simple.
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
SystemDirectory : C:\Windows\system32
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
The previous one is from my desktop.
This one is from the server:
SystemDirectory : C:\Windows\system32
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601
This one is from the server:
SystemDirectory : C:\Windows\system32
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
I ran it from my desktop with the server name in it and from the server with the server name in it, just so there is no discrepancy.
Re: Script Packager
Did you run the command I posted or what. Please be clear about this.
Open a new PowerShel prompt and copy and paste this into the prompt.
Get-WmiObject win32_operatingsystem -ComputerName <replace with name>
Open a new PowerShel prompt and copy and paste this into the prompt.
Get-WmiObject win32_operatingsystem -ComputerName <replace with name>
- markcusano
- Posts: 21
- Last visit: Mon Oct 23, 2017 1:22 pm
Re: Script Packager
Yes
I ran
Get-WmiObject win32_operatingsystem -ComputerName <replace with name>
from the Powershell Prompt (not ise)
and those are the results I received.
SystemDirectory : C:\Windows\system32
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601
I ran
Get-WmiObject win32_operatingsystem -ComputerName <replace with name>
from the Powershell Prompt (not ise)
and those are the results I received.
SystemDirectory : C:\Windows\system32
Organization : CompanyName
BuildNumber : 7601
RegisteredUser : CompanyName
SerialNumber : nnnnn-nnn-nnnnnnn-nnnnn
Version : 6.1.7601