ExpertConnect - Mentoring & Discussions

You can join mentoring & discussions for Free Ask Question, Give Answer, Discuss IT Problems, Learn, and Grow

2017-10-20 14:12:11 8

Powershell

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.

Topic menu

2018-06-01 17:27:50 0
What's in your mind?
Profile picture of SCOTT SIMMONS

$A = Get-ADuser [user] -properties * | Select Name,SamAccountName,Enabled.
If I try to use $A.SamAccountName, it fails.
but
If I do this: $A = Get-ADuser [user] -properties *
I can execute a command and use, for example, $A.Name (or any other property) and it woks

Hi Paul…GO PACK GO!

Comment ·  Like
Profile picture of Alex Noel

How do I replace a string of lines in a text file with lines from another file?

Comment ·  Like
Profile picture of Paul Heuring
Paul Heuring
Public
Posted: Oct 31, 2018

Here is a link to the Big Book Of PowerShell Troubleshooting https://leanpub.com/thebigbookofpowershellerrorhandling

Comment ·  Like
Profile picture of Miles  Moen
Miles  Moen
Public
Posted: Jun 1, 2018

How to determine the type of a variable?

Comment (1) ·  Like (1)
Profile picture of Wajih Qidwai

Wajih Qidwai Jun 1, 2018

type of a variable can be examined by using GetType() method. for instance
$CoumpterName.GetType()

Like (1)

Write a new comment...
Ready to post? select an option:
Profile picture of Miles  Moen
Miles  Moen
Public
Posted: Jun 1, 2018

How can I limit number of Lines I want to read using Get-content, from a text file?

Comment (1) ·  Like (1)
Profile picture of Wajih Qidwai

Wajih Qidwai Jun 1, 2018

you can limit the content by -TotalCount parameter. This parameter is used to specify how many lines do you want to read

Like

Write a new comment...
Ready to post? select an option:
Profile picture of Miles  Moen
Miles  Moen
Public
Posted: Jun 1, 2018

What is WMI?

Comment (1) ·  Like (1)
Profile picture of Wajih Qidwai

Wajih Qidwai Jun 1, 2018

Windows Management Infrastructure, is the CIM-Server for Windows
it is comprised of a powerful set of tools used to manage Windows systems both locally and remotely

Like

Write a new comment...
Ready to post? select an option:
Profile picture of Joey  Lemos
Joey  Lemos
Public
Posted: Jun 1, 2018

what could be the possible requirements to execute Enable-PSRemoting command?

Comment (1) ·  Like (2)
Profile picture of Wajih Qidwai

Wajih Qidwai Jun 1, 2018

The user who is executing this command must be member of “Local Administrator” group

Like

Write a new comment...
Ready to post? select an option:
Profile picture of Joey  Lemos
Joey  Lemos
Public
Posted: Jun 1, 2018

what different variable scopes are possible in PowerShell?

Comment (1) ·  Like (2)
Profile picture of Wajih Qidwai

Wajih Qidwai Jun 1, 2018

In Powershell variable can have Global, script and Function level scopes

Like

Write a new comment...
Ready to post? select an option:


Topic Learners
Topic Experts