[SOLVED] Restarting or shutting down workstations

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
adgm11
Messages: 45
Registration: Apr 12, 2022 - 07:00

August 6, 2022 - 6:52 PM

Hello
, I can't restart or shut down a unit in the console. Only Wake-on-LAN to start a unit works. The other functions are grayed out. How do I enable them?

WAPT Discovery 2.2.1
User avatar
t.heroult
Messages: 307
Registration: December 8, 2020 - 10:13 AM

August 8, 2022 - 09:28

Good morning

The options must be enabled in the target's wapt-get.ini file.
You can do this by checking the corresponding boxes when creating the agent, or configure it during installation by writing the following lines in setup.py:

Code: Select all

inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_reboot', 1)
inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_shutdown', 1) 
1 is to activate, 0 is to deactivate.
Server: WAPT Enterprise 2.6.1.17786 on Debian
Consoles: Windows 10 & 11
Infrastructure: Windows

Did you know? When parrotfish undergo smoltification, their osmoregulation mechanism is reversed!
adgm11
Messages: 45
Registration: Apr 12, 2022 - 07:00

August 10, 2022 - 11:56

Hello,
editing the wapt-get.ini file and changing the allow_remote_reboot and shutdown values ​​to 1 didn't work. I restarted the service on the client machine and rebooted. But the option remains grayed out in the console. Is there anything I can do on the host machine that has the console?
As for the setup.py file, I don't see how to modify it since I have to use wapt-deploy on the client machines, which is an .exe file. I run it via a batch command on each machine.
The only file I can modify is the setup.py file from the waptupgrade package.

here is the ini file which seems modified but has no impact
[global]
repo_url=https://172.16.11.11/wapt
send_usage_report=1
use_hostpackages=1
wapt_server=https://172.16.11.11
use_kerberos=0
check_certificates_validity=1
verify_cert=0
use_repo_rules=0
allow_remote_reboot=1
allow_remote_shutdown=1
max_gpo_script_wait=180
pre_shutdown_timeout=180
hiberboot_enabled=0
[wapt-templates]
repo_url=https://store.wapt.fr/wapt
verify_cert=1
[waptwua]
default_allow=false
install_at_shutdown=false
User avatar
t.heroult
Messages: 307
Registration: December 8, 2020 - 10:13 AM

August 11, 2022 - 09:34

For the WAPT deployment, what I do is there is a GPO that installs a basic agent.
Next, when the PC is in WAPT, it will receive a package to install the latest version of WAPT to keep it up to date. This package contains a configuration.
In the Tranqui IT repository, there is also a small package used solely for WAPT configuration

Code: Select all

tis-wapt-conf-policy
With this, it's quite easy to redo the agent configuration.

However, I'm going to let the Tranquil IT techs look into with you why it's not working in the console.

Sincerely,
Tom
Server: WAPT Enterprise 2.6.1.17786 on Debian
Consoles: Windows 10 & 11
Infrastructure: Windows

Did you know? When parrotfish undergo smoltification, their osmoregulation mechanism is reversed!
alain17
Messages: 24
Registration: June 17, 2022 - 07:32

August 19, 2022 - 11:25

Good morning,

I have a similar problem, though perhaps not 100% identical (WAPT 2.2.2 Enterprise version). I'll report it here anyway: when I deploy a copy of tis-wapt-conf-policy with the following content, the deployment goes smoothly:

Code: Select all

def install():
    print("Applying WAPT Configuration Policy")

    # Editing wapt-get.ini of the WAPT Agent
    inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_reboot', 1)
    inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_shutdown', 1)

    print("Reloading WAPT configuration")
    WAPT.reload_config_if_updated()


def uninstall():
    print("Reverting WAPT Configuration Policy")

    # Remove options from the wapt-get.ini of the WAPT Agent
    inifile_deleteoption(WAPT.config_filename, 'global', 'allow_remote_reboot')
    inifile_deleteoption(WAPT.config_filename, 'global', 'allow_remote_shutdown')

    print("Reloading WAPT configuration")
    WAPT.reload_config_if_updated()
However, when I check the configuration on the test machine, its configuration has indeed been updated, however the allow_remote_reboot and allow_remote_shutdown values ​​are reset to 0. I should point out that I also configured a package to update the agent, and that it is supposed to activate these values, which I still cannot get to work.

The logs do not show any errors, but indicate that the package was deployed correctly (I see the "Applying" and "Reloading" traces as indicated in the install() function.

If I manually change the values ​​and restart the WAPT service (or the computer), something resets the values ​​to 0, which is quite strange...

EDIT: For some cryptic reason, I managed to apply the reboot and shutdown configuration to another system. As a precaution, I defined the WAPT agent package as a dependency for the update package in wapt-get.ini. This should make things more stable in the future, as the agent will be updated before the configuration is applied, which should help.
adgm11
Messages: 45
Registration: Apr 12, 2022 - 07:00

August 19, 2022 - 4:26 PM

So I don't quite understand what I'm supposed to do. If modifying the wapt-get.ini file with the values ​​"1" in the right places doesn't work, what else needs to be done to make it recognized in the console?

"I defined the WAPT agent package as a dependency for the wapt-get.ini update package" - I didn't quite understand that part, how is that done?
Are we talking about the waptupgrade package? Because I still don't see how it's possible to have a wapt-agent package if the machine hasn't yet been installed via GPO, for example.
adgm11
Messages: 45
Registration: Apr 12, 2022 - 07:00

August 21, 2022 - 1:07 PM

Hello. Is this option included in Discovery mode or is an Enterprise license required?
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

August 22, 2022 - 3:42 PM

Yes, it's only available with an enterprise license. If the menus aren't grayed out in the console, it's an error; we must have missed that during the merging of the enterprise and community code into a single binary.

Regards,

Denis Cardon
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
adgm11
Messages: 45
Registration: Apr 12, 2022 - 07:00

August 22, 2022 - 6:30 PM

Phew, thank you! That explains everything; I was starting to tear my hair out.
In discovery mode, the restart and shut down actions are therefore logically greyed out in the context menu.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

August 22, 2022 - 6:35 PM

Yes, that's right, it's normal that they're greyed out in Discovery mode.

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked