Python Forum
Python for Windows Administration
Thread Rating:
  • 3 Vote(s) - 2.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python for Windows Administration
#1
Hey guys,

Instead of picking up Powershell I was looking to look more towards Python, but can you do what you can with powershell via windows administration with Python?

my code here
Reply
#2
Not exactly sure what you are asking. Powershell is a scripting language for Windows and you could run it's commands with the Python 'subprocess' library or there are several library's for Python that allow you to work with the Windows API directly. Perhaps if you gave a few examples of what you are trying to do, you might get a clearer response.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Lets say If I want to work with AD. For example in AD I created a group but wanted to add 30 users or computers to it. Can you do this stuff in python?
Reply
#4
You could start here: Pyad, as well as just using you're favorite search engine for "Python and Windows Active Directory"
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
Thank you sparkz, I just want to know before I jump into something it will do what I want in the end.
Reply
#6
I recently read or heard (can't remember, maybe it was on here :-D)
Quote:"With Python, there is a library for everything."
and I am prone to agree with that. My favorite search query "Python3 and keyword"  Smile
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#7
and also look in pypi.org: https://pypi.python.org/pypi
Reply
#8
See Cygwin. It has all you need
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#9
(Jul-18-2017, 11:25 PM)wavic Wrote: See Cygwin. It has all you need

I don't see the benefit. As I understand it, the OP's question was Powershell vs Python, not Windows vs Linux.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#10
It is not one vs another. It gives the power of the Linux shell to Windows
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020