Flint provides out-of-the-box or ready to use workflows for WinRm Operations. Here are the details of workflows/Flintbits for WinRm operations-

flint-utilhttps://github.com/getflint/flint-util.gitflint-util > winrm > operation

Available Flintbits

Perform all standard application operations available through the WinRm, Some of them are listed below:

WinRm available Flintbits

  • execute_command.rb
  • powershell_command.rb
  • ipconfig.rb
  • systeminfo.rb
  • dir.rb

Execute_command

This operation helps you to execute commands on Remote Windows Server

Input and output JSON for the Execute_command using Basic and NTLM protocols

This section illustrates the Flintbit Input and output for Execute_command using Basic and NTLM protocols.

Sample Input JSON for the Execute_command using Basic and NTLM protocols
{
"connector_name" : "winrm",
"hostname": "52.87.101.150",
"username": "Administrator",
"password": "YrMbiz5Tz5g",
"protocol": "http",
"command": "hostname",
"port": 5985
}


Flintbit input elements for the Execute_command using Basic and NTLM protocols
connector_nameName of the WinRM Connector to be configured.true

hostname

Host name or ip-address of the host server machine to connect withtrue
usernameUsername of the remote machinetrue
passwordPassword of the remote machinetrue
protocolConnect with specified protocol, host server machine authentication. true
commandCommand to be executed on the host server machinetrue
portPort to connect to the host server machine. Default port is 5985 for Httptrue
Sample JSON output for the Execute_command using Basic protocols
{
  "meta": {
    "job-id": "job-309c717f-5b49-4e86-b1bf-400376c97f38",
    "exit-code": 0,
    "context": "flint-util:winrm:basic:execute_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470982072331,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "WIN-IUK7U3BN3RM\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}
Sample JSON output for the Execute_command using NTLM protocols
{
  "meta": {
    "job-id": "job-35e7d90f-d78c-4c27-bb07-a017965a1884",
    "exit-code": 0,
    "context": "flint-util:winrm:ntlm:execute_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470982007001,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "WIN-IUK7U3BN3RM\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}

Powershell_command

This operation helps you to execute Powershell commands on Remote Windows Server

Input and output JSON for the Powershell_command using Basic and NTLM protocols

This section illustrates the Flintbit Input and output for Powershell_command using Basic and NTLM protocols 

Sample Input JSON for the Powershell_command using Basic and NTLM protocols
{
"connector_name" : "winrm",
"hostname": "52.87.101.150",
"username": "Administrator",
"password": "YrMbiz5Tz5g",
"protocol": "http",
"command": "get-aduser priya",
"port": 5985
}


Flintbit input elements for the Powershell_command using Basic and NTLM protocols
connector_nameName of the WinRM Connector to be configured.true

hostname

Host name or ip-address of the host server machine to connect withtrue
usernameUsername of the remote machinetrue
passwordPassword of the remote machinetrue
protocolConnect with specified protocol, host server machine authentication. true
commandCommand to be executed on pwershell server machinetrue
portPort to connect to the host server machine. Default port is 5985 for Httptrue
Sample JSON output for the Powershell_command using Basic protocols
{
  "meta": {
    "job-id": "job-28cdad63-3c66-4241-95ec-5d56992817e2",
    "exit-code": 0,
    "context": "flint-util:winrm:basic:powershell_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470049575957,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\n\r\nDistinguishedName : CN=Priya,CN=Users,DC=infiverve,DC=com\r\nEnabled           : False\r\nGivenName         : priya\r\nName              : Priya\r\nObjectClass       : user\r\nObjectGUID        : 2c74f916-45be-4830-a410-53a6446e4654\r\nSamAccountName    : priya\r\nSID               : S-1-5-21-3273214642-154621977-3307976672-1144\r\nSurname           : Rupeja\r\nUserPrincipalName : \r\n\r\n\r\n\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}
Sample JSON output for the Powershell_command using NTLM protocols
{
  "meta": {
    "job-id": "job-ee6ecb33-9c3f-40e0-bdb6-d242b506b971",
    "exit-code": 0,
    "context": "flint-util:winrm:ntlm:powershell_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470982294991,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\n\r\nDistinguishedName : CN=Priya,CN=Users,DC=infiverve,DC=com\r\nEnabled           : False\r\nGivenName         : priya\r\nName              : Priya\r\nObjectClass       : user\r\nObjectGUID        : 2c74f916-45be-4830-a410-53a6446e4654\r\nSamAccountName    : priya\r\nSID               : S-1-5-21-3273214642-154621977-3307976672-1144\r\nSurname           : Rupeja\r\nUserPrincipalName : \r\n\r\n\r\n\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}

IP_config

This operation helps you to execute IP_config command on Remote Windows Server

Input and output JSON for IP_config command using Basic and NTLM protocols

This section illustrates the Flintbit Input and output for IP_config command using Basic and NTLM protocols.

Sample Input JSON for the IP_config command using Basic and NTLM protocols
{
"connector_name" : "winrm",
"hostname": "52.87.101.150",
"username": "Administrator",
"password": "YrMbiz5Tz5g",
"protocol": "http",
"port": 5985
}


Flintbit input elements for the  IP_config command using Basic and NTLM protocols
connector_nameName of the WinRM Connector to be configured.true

hostname

Host name or ip-address of the host server machine to connect withtrue
usernameUsername of the remote machinetrue
passwordPassword of the remote machinetrue
protocolConnect with specified protocol, host server machine authentication. true
portPort to connect to the host server machine. Default port is 5985 for Httptrue
Sample JSON output for the IP_config command using Basic protocols
{
  "meta": {
    "job-id": "job-b6d68084-f5c0-4a2e-ab3c-0ab1ccff5e7f",
    "exit-code": 0,
    "context": "flint-util:winrm:basic:execute_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470045467176,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\nWindows IP Configuration\r\n\r\n\r\nEthernet adapter Ethernet:\r\n\r\n   Connection-specific DNS Suffix  . : ec2.internal\r\n   Link-local IPv6 Address . . . . . : fe80::acd5:db87:6f0c:7ce9%12\r\n   IPv4 Address. . . . . . . . . . . : 10.0.37.4\r\n   Subnet Mask . . . . . . . . . . . : 255.255.255.0\r\n   Default Gateway . . . . . . . . . : 10.0.37.1\r\n\r\nTunnel adapter isatap.ec2.internal:\r\n\r\n   Media State . . . . . . . . . . . : Media disconnected\r\n   Connection-specific DNS Suffix  . : ec2.internal\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}
Sample JSON output for the IP_config command using NTML protocols
{
  "meta": {
    "job-id": "job-f73b2e7c-1c32-4c47-abc3-bb1600092c29",
    "exit-code": 0,
    "context": "flint-util:winrm:ntlm:ipconfig.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470982807679,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\nWindows IP Configuration\r\n\r\n\r\nEthernet adapter Ethernet:\r\n\r\n   Connection-specific DNS Suffix  . : ec2.internal\r\n   Link-local IPv6 Address . . . . . : fe80::acd5:db87:6f0c:7ce9%12\r\n   IPv4 Address. . . . . . . . . . . : 10.0.37.4\r\n   Subnet Mask . . . . . . . . . . . : 255.255.255.0\r\n   Default Gateway . . . . . . . . . : 10.0.37.1\r\n\r\nTunnel adapter isatap.ec2.internal:\r\n\r\n   Media State . . . . . . . . . . . : Media disconnected\r\n   Connection-specific DNS Suffix  . : ec2.internal\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}

System_info

This operation helps you to execute System_info command on Remote Windows Server

Input and output JSON for System_info command using Basic and NTLM protocols

This section illustrates the Flintbit Input and output for System_info command using Basic and NTLM protocols.

Sample Input JSON for the System_info command using Basic and NTLM protocols
{
"connector_name" : "winrm",
"hostname": "52.87.101.150",
"username": "Administrator",
"password": "YrMbiz5Tz5g",
"protocol": "http",
"port": 5985
}

Flintbit input elements for the System_info command using Basic and NTLM protocols
connector_nameName of the WinRM Connector to be configured.true

hostname

Host name or ip-address of the host server machine to connect withtrue
usernameUsername of the remote machinetrue
passwordPassword of the remote machinetrue
protocolConnect with specified protocol, host server machine authentication. true
portPort to connect to the host server machine. Default port is 5985 for Httptrue
Sample JSON output for the System_info command using Basic protocols
{
  "meta": {
    "job-id": "job-55690ade-9f4c-4e85-ace5-188ba7376a67",
    "exit-code": 0,
    "context": "flint-util:winrm:basic:execute_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470045614312,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\nHost Name:                 WIN-IUK7U3BN3RM\r\nOS Name:                   Microsoft Windows Server 2012 R2 Standard\r\nOS Version:                6.3.9600 N/A Build 9600\r\nOS Manufacturer:           Microsoft Corporation\r\nOS Configuration:          Primary Domain Controller\r\nOS Build Type:             Multiprocessor Free\r\nRegistered Owner:          EC2\r\nRegistered Organization:   Amazon.com\r\nProduct ID:                00252-70000-00000-AA535\r\nOriginal Install Date:     3/14/2016, 1:18:21 PM\r\nSystem Boot Time:          6/24/2016, 5:58:46 AM\r\nSystem Manufacturer:       Xen\r\nSystem Model:              HVM domU\r\nSystem Type:               x64-based PC\r\nProcessor(s):              1 Processor(s) Installed.\r\n                           [01]: Intel64 Family 6 Model 63 Stepping 2 GenuineIntel ~2400 Mhz\r\nBIOS Version:              Xen 4.2.amazon, 5/12/2016\r\nWindows Directory:         C:\\Windows\r\nSystem Directory:          C:\\Windows\\system32\r\nBoot Device:               \\Device\\HarddiskVolume1\r\nSystem Locale:             en-us;English (United States)\r\nInput Locale:              en-us;English (United States)\r\nTime Zone:                 (UTC) Coordinated Universal Time\r\nTotal Physical Memory:     1,024 MB\r\nAvailable Physical Memory: 171 MB\r\nVirtual Memory: Max Size:  9,216 MB\r\nVirtual Memory: Available: 7,980 MB\r\nVirtual Memory: In Use:    1,236 MB\r\nPage File Location(s):     C:\\pagefile.sys\r\nDomain:                    infiverve.com\r\nLogon Server:              \\\\WIN-IUK7U3BN3RM\r\nHotfix(s):                 225 Hotfix(s) Installed.\r\n                           [01]: KB2894856\r\n                           [02]: KB2896496\r\n                           [03]: KB2919355\r\n                           [04]: KB2919442\r\n                           [05]: KB2920189\r\n                           [06]: KB2934520\r\n                           [07]: KB2938066\r\n                           [08]: KB2938772\r\n                           [09]: KB2949621\r\n                           [10]: KB2954879\r\n                           [11]: KB2955164\r\n                           [12]: KB2959626\r\n                           [13]: KB2961072\r\n                           [14]: KB2962409\r\n                           [15]: KB2962806\r\n                           [16]: KB2965500\r\n                           [17]: KB2967917\r\n                           [18]: KB2969339\r\n                           [19]: KB2971203\r\n                           [20]: KB2973351\r\n                           [21]: KB2973448\r\n                           [22]: KB2975061\r\n                           [23]: KB2975719\r\n                           [24]: KB2976627\r\n                           [25]: KB2977765\r\n                           [26]: KB2978041\r\n                           [27]: KB2978126\r\n                           [28]: KB2979576\r\n                           [29]: KB2984006\r\n                           [30]: KB2987107\r\n                           [31]: KB2989647\r\n                           [32]: KB2989930\r\n                           [33]: KB2993100\r\n                           [34]: KB2995004\r\n                           [35]: KB2995388\r\n                           [36]: KB2996799\r\n                           [37]: KB2998174\r\n                           [38]: KB2999226\r\n                           [39]: KB3000850\r\n                           [40]: KB3003057\r\n                           [41]: KB3004361\r\n                           [42]: KB3004365\r\n                           [43]: KB3004394\r\n                           [44]: KB3004545\r\n                           [45]: KB3006137\r\n                           [46]: KB3008923\r\n                           [47]: KB3012199\r\n                           [48]: KB3012702\r\n                           [49]: KB3013172\r\n                           [50]: KB3013410\r\n                           [51]: KB3013769\r\n                           [52]: KB3013791\r\n                           [53]: KB3013816\r\n                           [54]: KB3014029\r\n                           [55]: KB3014442\r\n                           [56]: KB3018467\r\n                           [57]: KB3019978\r\n                           [58]: KB3020338\r\n                           [59]: KB3021910\r\n                           [60]: KB3021952\r\n                           [61]: KB3022345\r\n                           [62]: KB3022777\r\n                           [63]: KB3023222\r\n                           [64]: KB3023266\r\n                           [65]: KB3024751\r\n                           [66]: KB3024755\r\n                           [67]: KB3029438\r\n                           [68]: KB3029603\r\n                           [69]: KB3030377\r\n                           [70]: KB3030947\r\n                           [71]: KB3032359\r\n                           [72]: KB3032663\r\n                           [73]: KB3033446\r\n                           [74]: KB3034348\r\n                           [75]: KB3035017\r\n                           [76]: KB3035126\r\n                           [77]: KB3035132\r\n                           [78]: KB3035527\r\n                           [79]: KB3036612\r\n                           [80]: KB3037579\r\n                           [81]: KB3037924\r\n                           [82]: KB3038002\r\n                           [83]: KB3038314\r\n                           [84]: KB3038562\r\n                           [85]: KB3038701\r\n                           [86]: KB3041857\r\n                           [87]: KB3042058\r\n                           [88]: KB3042085\r\n                           [89]: KB3042553\r\n                           [90]: KB3043812\r\n                           [91]: KB3044374\r\n                           [92]: KB3044673\r\n                           [93]: KB3045634\r\n                           [94]: KB3045685\r\n                           [95]: KB3045717\r\n                           [96]: KB3045719\r\n                           [97]: KB3045755\r\n                           [98]: KB3045992\r\n                           [99]: KB3045999\r\n                           [100]: KB3046017\r\n                           [101]: KB3046359\r\n                           [102]: KB3046737\r\n                           [103]: KB3047255\r\n                           [104]: KB3048043\r\n                           [105]: KB3048778\r\n                           [106]: KB3049563\r\n                           [107]: KB3049989\r\n                           [108]: KB3054169\r\n                           [109]: KB3054203\r\n                           [110]: KB3054256\r\n                           [111]: KB3054464\r\n                           [112]: KB3055323\r\n                           [113]: KB3055343\r\n                           [114]: KB3055642\r\n                           [115]: KB3058168\r\n                           [116]: KB3059316\r\n                           [117]: KB3059317\r\n                           [118]: KB3060383\r\n                           [119]: KB3060681\r\n                           [120]: KB3060716\r\n                           [121]: KB3060793\r\n                           [122]: KB3061468\r\n                           [123]: KB3061512\r\n                           [124]: KB3061518\r\n                           [125]: KB3063843\r\n                           [126]: KB3064209\r\n                           [127]: KB3065013\r\n                           [128]: KB3066441\r\n                           [129]: KB3067505\r\n                           [130]: KB3068457\r\n                           [131]: KB3068708\r\n                           [132]: KB3069392\r\n                           [133]: KB3071663\r\n                           [134]: KB3071756\r\n                           [135]: KB3072595\r\n                           [136]: KB3072630\r\n                           [137]: KB3072633\r\n                           [138]: KB3073874\r\n                           [139]: KB3074228\r\n                           [140]: KB3074548\r\n                           [141]: KB3075220\r\n                           [142]: KB3075249\r\n                           [143]: KB3075853\r\n                           [144]: KB3076895\r\n                           [145]: KB3077715\r\n                           [146]: KB3078071\r\n                           [147]: KB3078405\r\n                           [148]: KB3078601\r\n                           [149]: KB3078676\r\n                           [150]: KB3080042\r\n                           [151]: KB3080149\r\n                           [152]: KB3080446\r\n                           [153]: KB3081320\r\n                           [154]: KB3082089\r\n                           [155]: KB3082353\r\n                           [156]: KB3083325\r\n                           [157]: KB3083711\r\n                           [158]: KB3083992\r\n                           [159]: KB3084135\r\n                           [160]: KB3084905\r\n                           [161]: KB3086255\r\n                           [162]: KB3087038\r\n                           [163]: KB3087039\r\n                           [164]: KB3087041\r\n                           [165]: KB3087088\r\n                           [166]: KB3087137\r\n                           [167]: KB3087390\r\n                           [168]: KB3087418\r\n                           [169]: KB3088195\r\n                           [170]: KB3091297\r\n                           [171]: KB3092601\r\n                           [172]: KB3092627\r\n                           [173]: KB3093983\r\n                           [174]: KB3094486\r\n                           [175]: KB3095649\r\n                           [176]: KB3095701\r\n                           [177]: KB3096411\r\n                           [178]: KB3096433\r\n                           [179]: KB3097877\r\n                           [180]: KB3097966\r\n                           [181]: KB3097997\r\n                           [182]: KB3098779\r\n                           [183]: KB3099834\r\n                           [184]: KB3100773\r\n                           [185]: KB3100919\r\n                           [186]: KB3100956\r\n                           [187]: KB3101183\r\n                           [188]: KB3101246\r\n                           [189]: KB3101746\r\n                           [190]: KB3102429\r\n                           [191]: KB3102467\r\n                           [192]: KB3102812\r\n                           [193]: KB3102939\r\n                           [194]: KB3103696\r\n                           [195]: KB3104002\r\n                           [196]: KB3107998\r\n                           [197]: KB3108347\r\n                           [198]: KB3108381\r\n                           [199]: KB3109094\r\n                           [200]: KB3109103\r\n                           [201]: KB3109853\r\n                           [202]: KB3110329\r\n                           [203]: KB3112148\r\n                           [204]: KB3112336\r\n                           [205]: KB3121212\r\n                           [206]: KB3121461\r\n                           [207]: KB3121918\r\n                           [208]: KB3122654\r\n                           [209]: KB3123294\r\n                           [210]: KB3123479\r\n                           [211]: KB3124001\r\n                           [212]: KB3124275\r\n                           [213]: KB3126041\r\n                           [214]: KB3126434\r\n                           [215]: KB3126446\r\n                           [216]: KB3126587\r\n                           [217]: KB3126593\r\n                           [218]: KB3127226\r\n                           [219]: KB3132080\r\n                           [220]: KB3133043\r\n                           [221]: KB3134214\r\n                           [222]: KB3134222\r\n                           [223]: KB3134814\r\n                           [224]: KB3135449\r\n                           [225]: KB3141092\r\nNetwork Card(s):           1 NIC(s) Installed.\r\n                           [01]: AWS PV Network Device\r\n                                 Connection Name: Ethernet\r\n                                 DHCP Enabled:    Yes\r\n                                 DHCP Server:     10.0.37.1\r\n                                 IP address(es)\r\n                                 [01]: 10.0.37.4\r\n                                 [02]: fe80::acd5:db87:6f0c:7ce9\r\nHyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}
Sample JSON output for the System_info command using NTLM protocols
{
  "meta": {
    "job-id": "job-2f027823-e2f2-41f3-a441-8e6dc0a07170",
    "exit-code": 0,
    "context": "flint-util:winrm:ntlm:systeminfo.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470983148664,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": "\r\nHost Name:                 WIN-IUK7U3BN3RM\r\nOS Name:                   Microsoft Windows Server 2012 R2 Standard\r\nOS Version:                6.3.9600 N/A Build 9600\r\nOS Manufacturer:           Microsoft Corporation\r\nOS Configuration:          Primary Domain Controller\r\nOS Build Type:             Multiprocessor Free\r\nRegistered Owner:          EC2\r\nRegistered Organization:   Amazon.com\r\nProduct ID:                00252-70000-00000-AA535\r\nOriginal Install Date:     3/14/2016, 1:18:21 PM\r\nSystem Boot Time:          6/24/2016, 5:58:46 AM\r\nSystem Manufacturer:       Xen\r\nSystem Model:              HVM domU\r\nSystem Type:               x64-based PC\r\nProcessor(s):              1 Processor(s) Installed.\r\n                           [01]: Intel64 Family 6 Model 63 Stepping 2 GenuineIntel ~2400 Mhz\r\nBIOS Version:              Xen 4.2.amazon, 5/12/2016\r\nWindows Directory:         C:\\Windows\r\nSystem Directory:          C:\\Windows\\system32\r\nBoot Device:               \\Device\\HarddiskVolume1\r\nSystem Locale:             en-us;English (United States)\r\nInput Locale:              en-us;English (United States)\r\nTime Zone:                 (UTC) Coordinated Universal Time\r\nTotal Physical Memory:     1,024 MB\r\nAvailable Physical Memory: 178 MB\r\nVirtual Memory: Max Size:  9,216 MB\r\nVirtual Memory: Available: 7,806 MB\r\nVirtual Memory: In Use:    1,410 MB\r\nPage File Location(s):     C:\\pagefile.sys\r\nDomain:                    infiverve.com\r\nLogon Server:              \\\\WIN-IUK7U3BN3RM\r\nHotfix(s):                 225 Hotfix(s) Installed.\r\n                           [01]: KB2894856\r\n                           [02]: KB2896496\r\n                           [03]: KB2919355\r\n                           [04]: KB2919442\r\n                           [05]: KB2920189\r\n                           [06]: KB2934520\r\n                           [07]: KB2938066\r\n                           [08]: KB2938772\r\n                           [09]: KB2949621\r\n                           [10]: KB2954879\r\n                           [11]: KB2955164\r\n                           [12]: KB2959626\r\n                           [13]: KB2961072\r\n                           [14]: KB2962409\r\n                           [15]: KB2962806\r\n                           [16]: KB2965500\r\n                           [17]: KB2967917\r\n                           [18]: KB2969339\r\n                           [19]: KB2971203\r\n                           [20]: KB2973351\r\n                           [21]: KB2973448\r\n                           [22]: KB2975061\r\n                           [23]: KB2975719\r\n                           [24]: KB2976627\r\n                           [25]: KB2977765\r\n                           [26]: KB2978041\r\n                           [27]: KB2978126\r\n                           [28]: KB2979576\r\n                           [29]: KB2984006\r\n                           [30]: KB2987107\r\n                           [31]: KB2989647\r\n                           [32]: KB2989930\r\n                           [33]: KB2993100\r\n                           [34]: KB2995004\r\n                           [35]: KB2995388\r\n                           [36]: KB2996799\r\n                           [37]: KB2998174\r\n                           [38]: KB2999226\r\n                           [39]: KB3000850\r\n                           [40]: KB3003057\r\n                           [41]: KB3004361\r\n                           [42]: KB3004365\r\n                           [43]: KB3004394\r\n                           [44]: KB3004545\r\n                           [45]: KB3006137\r\n                           [46]: KB3008923\r\n                           [47]: KB3012199\r\n                           [48]: KB3012702\r\n                           [49]: KB3013172\r\n                           [50]: KB3013410\r\n                           [51]: KB3013769\r\n                           [52]: KB3013791\r\n                           [53]: KB3013816\r\n                           [54]: KB3014029\r\n                           [55]: KB3014442\r\n                           [56]: KB3018467\r\n                           [57]: KB3019978\r\n                           [58]: KB3020338\r\n                           [59]: KB3021910\r\n                           [60]: KB3021952\r\n                           [61]: KB3022345\r\n                           [62]: KB3022777\r\n                           [63]: KB3023222\r\n                           [64]: KB3023266\r\n                           [65]: KB3024751\r\n                           [66]: KB3024755\r\n                           [67]: KB3029438\r\n                           [68]: KB3029603\r\n                           [69]: KB3030377\r\n                           [70]: KB3030947\r\n                           [71]: KB3032359\r\n                           [72]: KB3032663\r\n                           [73]: KB3033446\r\n                           [74]: KB3034348\r\n                           [75]: KB3035017\r\n                           [76]: KB3035126\r\n                           [77]: KB3035132\r\n                           [78]: KB3035527\r\n                           [79]: KB3036612\r\n                           [80]: KB3037579\r\n                           [81]: KB3037924\r\n                           [82]: KB3038002\r\n                           [83]: KB3038314\r\n                           [84]: KB3038562\r\n                           [85]: KB3038701\r\n                           [86]: KB3041857\r\n                           [87]: KB3042058\r\n                           [88]: KB3042085\r\n                           [89]: KB3042553\r\n                           [90]: KB3043812\r\n                           [91]: KB3044374\r\n                           [92]: KB3044673\r\n                           [93]: KB3045634\r\n                           [94]: KB3045685\r\n                           [95]: KB3045717\r\n                           [96]: KB3045719\r\n                           [97]: KB3045755\r\n                           [98]: KB3045992\r\n                           [99]: KB3045999\r\n                           [100]: KB3046017\r\n                           [101]: KB3046359\r\n                           [102]: KB3046737\r\n                           [103]: KB3047255\r\n                           [104]: KB3048043\r\n                           [105]: KB3048778\r\n                           [106]: KB3049563\r\n                           [107]: KB3049989\r\n                           [108]: KB3054169\r\n                           [109]: KB3054203\r\n                           [110]: KB3054256\r\n                           [111]: KB3054464\r\n                           [112]: KB3055323\r\n                           [113]: KB3055343\r\n                           [114]: KB3055642\r\n                           [115]: KB3058168\r\n                           [116]: KB3059316\r\n                           [117]: KB3059317\r\n                           [118]: KB3060383\r\n                           [119]: KB3060681\r\n                           [120]: KB3060716\r\n                           [121]: KB3060793\r\n                           [122]: KB3061468\r\n                           [123]: KB3061512\r\n                           [124]: KB3061518\r\n                           [125]: KB3063843\r\n                           [126]: KB3064209\r\n                           [127]: KB3065013\r\n                           [128]: KB3066441\r\n                           [129]: KB3067505\r\n                           [130]: KB3068457\r\n                           [131]: KB3068708\r\n                           [132]: KB3069392\r\n                           [133]: KB3071663\r\n                           [134]: KB3071756\r\n                           [135]: KB3072595\r\n                           [136]: KB3072630\r\n                           [137]: KB3072633\r\n                           [138]: KB3073874\r\n                           [139]: KB3074228\r\n                           [140]: KB3074548\r\n                           [141]: KB3075220\r\n                           [142]: KB3075249\r\n                           [143]: KB3075853\r\n                           [144]: KB3076895\r\n                           [145]: KB3077715\r\n                           [146]: KB3078071\r\n                           [147]: KB3078405\r\n                           [148]: KB3078601\r\n                           [149]: KB3078676\r\n                           [150]: KB3080042\r\n                           [151]: KB3080149\r\n                           [152]: KB3080446\r\n                           [153]: KB3081320\r\n                           [154]: KB3082089\r\n                           [155]: KB3082353\r\n                           [156]: KB3083325\r\n                           [157]: KB3083711\r\n                           [158]: KB3083992\r\n                           [159]: KB3084135\r\n                           [160]: KB3084905\r\n                           [161]: KB3086255\r\n                           [162]: KB3087038\r\n                           [163]: KB3087039\r\n                           [164]: KB3087041\r\n                           [165]: KB3087088\r\n                           [166]: KB3087137\r\n                           [167]: KB3087390\r\n                           [168]: KB3087418\r\n                           [169]: KB3088195\r\n                           [170]: KB3091297\r\n                           [171]: KB3092601\r\n                           [172]: KB3092627\r\n                           [173]: KB3093983\r\n                           [174]: KB3094486\r\n                           [175]: KB3095649\r\n                           [176]: KB3095701\r\n                           [177]: KB3096411\r\n                           [178]: KB3096433\r\n                           [179]: KB3097877\r\n                           [180]: KB3097966\r\n                           [181]: KB3097997\r\n                           [182]: KB3098779\r\n                           [183]: KB3099834\r\n                           [184]: KB3100773\r\n                           [185]: KB3100919\r\n                           [186]: KB3100956\r\n                           [187]: KB3101183\r\n                           [188]: KB3101246\r\n                           [189]: KB3101746\r\n                           [190]: KB3102429\r\n                           [191]: KB3102467\r\n                           [192]: KB3102812\r\n                           [193]: KB3102939\r\n                           [194]: KB3103696\r\n                           [195]: KB3104002\r\n                           [196]: KB3107998\r\n                           [197]: KB3108347\r\n                           [198]: KB3108381\r\n                           [199]: KB3109094\r\n                           [200]: KB3109103\r\n                           [201]: KB3109853\r\n                           [202]: KB3110329\r\n                           [203]: KB3112148\r\n                           [204]: KB3112336\r\n                           [205]: KB3121212\r\n                           [206]: KB3121461\r\n                           [207]: KB3121918\r\n                           [208]: KB3122654\r\n                           [209]: KB3123294\r\n                           [210]: KB3123479\r\n                           [211]: KB3124001\r\n                           [212]: KB3124275\r\n                           [213]: KB3126041\r\n                           [214]: KB3126434\r\n                           [215]: KB3126446\r\n                           [216]: KB3126587\r\n                           [217]: KB3126593\r\n                           [218]: KB3127226\r\n                           [219]: KB3132080\r\n                           [220]: KB3133043\r\n                           [221]: KB3134214\r\n                           [222]: KB3134222\r\n                           [223]: KB3134814\r\n                           [224]: KB3135449\r\n                           [225]: KB3141092\r\nNetwork Card(s):           1 NIC(s) Installed.\r\n                           [01]: AWS PV Network Device\r\n                                 Connection Name: Ethernet\r\n                                 DHCP Enabled:    Yes\r\n                                 DHCP Server:     10.0.37.1\r\n                                 IP address(es)\r\n                                 [01]: 10.0.37.4\r\n                                 [02]: fe80::acd5:db87:6f0c:7ce9\r\nHyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}

Dir

This operation helps you to execute Dir command on Remote Windows Server

Input and output JSON for Dir command using Basic and NTLM protocols

This section illustrates the Flintbit Input and output for Dir command using Basic and NTLM protocols.

Sample Input JSON for the Dir command using Basic and NTLM protocols
{
"connector_name" : "winrm",
"hostname": "52.87.101.150",
"username": "Administrator",
"password": "YrMbiz5Tz5g",
"protocol": "http",
"port": 5985
}


Flintbit input elements for the Dir command using Basic and NTLM protocols
connector_nameName of the WinRM Connector to be configured.true

hostname

Host name or ip-address of the host server machine to connect withtrue
usernameUsername of the remote machinetrue
passwordPassword of the remote machinetrue
protocolConnect with specified protocol, host server machine authentication. true
portPort to connect to the host server machine. Default port is 5985 for Httptrue
Sample JSON output for the Dir command using Basic protocols
{
  "meta": {
    "job-id": "job-b5bcbc20-3ebd-4b77-aecb-7cc72704dd2a",
    "exit-code": 0,
    "context": "flint-util:winrm:basic:execute_command.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470049239990,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": " Volume in drive C has no label.\r\n Volume Serial Number is 9212-3B63\r\n\r\n Directory of C:\\Users\\Administrator\r\n\r\n03/14/2016  01:50 PM    <DIR>          .\r\n03/14/2016  01:50 PM    <DIR>          ..\r\n03/14/2016  01:51 PM    <DIR>          Contacts\r\n03/14/2016  01:51 PM    <DIR>          Desktop\r\n03/30/2016  11:05 AM    <DIR>          Documents\r\n03/14/2016  01:51 PM    <DIR>          Downloads\r\n03/14/2016  01:51 PM    <DIR>          Favorites\r\n03/14/2016  01:51 PM    <DIR>          Links\r\n03/14/2016  01:51 PM    <DIR>          Music\r\n03/14/2016  01:51 PM    <DIR>          Pictures\r\n03/14/2016  01:51 PM    <DIR>          Saved Games\r\n03/14/2016  01:51 PM    <DIR>          Searches\r\n03/14/2016  01:51 PM    <DIR>          Videos\r\n               0 File(s)              0 bytes\r\n              13 Dir(s)  10,836,148,224 bytes free\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}
Sample JSON output for the Dir command using NTML protocols
{
  "meta": {
    "job-id": "job-1584bbcd-57c2-483f-b1cd-783a9fc08bea",
    "exit-code": 0,
    "context": "flint-util:winrm:ntlm:dir.rb",
    "message": "success",
    "timeout": 60000,
    "timestamp": 1470983014580,
    "status": "complete",
    "content-type": "application/json",
    "username": "admin"
  },
  "output": {
    "output": " Volume in drive C has no label.\r\n Volume Serial Number is 9212-3B63\r\n\r\n Directory of C:\\Users\\Administrator\r\n\r\n03/14/2016  01:50 PM    <DIR>          .\r\n03/14/2016  01:50 PM    <DIR>          ..\r\n03/14/2016  01:51 PM    <DIR>          Contacts\r\n03/14/2016  01:51 PM    <DIR>          Desktop\r\n03/30/2016  11:05 AM    <DIR>          Documents\r\n03/14/2016  01:51 PM    <DIR>          Downloads\r\n03/14/2016  01:51 PM    <DIR>          Favorites\r\n03/14/2016  01:51 PM    <DIR>          Links\r\n03/14/2016  01:51 PM    <DIR>          Music\r\n03/14/2016  01:51 PM    <DIR>          Pictures\r\n03/14/2016  01:51 PM    <DIR>          Saved Games\r\n03/14/2016  01:51 PM    <DIR>          Searches\r\n03/14/2016  01:51 PM    <DIR>          Videos\r\n               0 File(s)              0 bytes\r\n              13 Dir(s)  10,795,175,936 bytes free\r\n",
    "exit-code": 0,
    "message": "success",
    "error_output": ""
  }
}

 

 

  • No labels