| Server IP : 157.22.201.140 / Your IP : 216.73.216.74 Web Server : nginx/1.30.1 System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/ansible/plugins/shell/__pycache__/ |
Upload File : |
�
1<�e�, � � � d dl mZmZmZ eZdZd dlZd dlZd dl Z d dl
Z
d dlZd dlm
c mZ d dlZd dlmZmZ d dlmZ g d�Zd
d�Z G d� d e� Zy)� )�absolute_import�division�print_functionaL
name: powershell
version_added: historical
short_description: Windows PowerShell
description:
- The only option when using 'winrm' or 'psrp' as a connection plugin.
- Can also be used when using 'ssh' as a connection plugin and the C(DefaultShell) has been configured to PowerShell.
extends_documentation_fragment:
- shell_windows
N)�to_bytes�to_text)� ShellBase)�
PowerShellz
-NoProfilez-NonInteractivez-ExecutionPolicy�Unrestrictedc � � g }| r�| j d� dz }| | j d� | }| |d } t j |� }t j d|j
� }|rd|j
d� z nd}|j d |z � }|j |D � cg c]= } | j j d
� |k( s�"| j j dd� ��? c} � | r��t dj |� � S c c} w )
z�
Takes a byte string like '#< CLIXML
<Objs...' and extracts the stream
message encoded in the XML data. CLIXML is used by PowerShell to encode
multiple objects in stderr.
s </Objs>� s <Objs Nz{(.*)}z{%s}� � z./%sS�S�_x000D__x000A_z
)�find�ET�
fromstring�re�match�tag�group�findall�extend�attrib�get�text�replacer �join)
�data�stream�lines�end_idx�current_element�clixml�namespace_match� namespace�strings�es
�B/usr/lib/python3/dist-packages/ansible/plugins/shell/powershell.py�
_parse_clixmlr* ! s� � �
�E� ��)�)�J�'�!�+���t�y�y��3�G�<���G�H�~������/���(�(�9�f�j�j�9��9H�F�_�2�2�1�5�5�b� ��.�.��9�!4�5��
���G�k�q�q�x�x�|�|�\_�O`�dj�Oj�a�f�f�n�n�%5�r�:�k�l� � �F�K�K��&�'�'�� ls �"#D�Dc � � e Zd Z e� ZdZdZdZdZd� Z d� Z
d� Zd� Zd � Z
d
� Zd� Zdd�Zdd�Zdd�Zd� Zd� Zdd�Zd� Zd� Zd� Zdd�Zy
)�ShellModule�
powershellz> $null�;Tc � � y)Nr � )�self�kwargss r) �
env_prefixzShellModule.env_prefixM s � �� c �� � |D �cg c]&