简体   繁体   中英

Powershell: Using "Get-ADUser -Filter SamAccountName" as variable

Code:

$kullaniciisim = Get-ADUser -Filter {EmployeeNumber -eq '23214214'} | Select-Object SamAccountName
$kullaniciisim

Input:

SamAccountName
-------------- b.ozturk

I want $kullaniciisim to be b.ozturk not SamAccountName -------------- b.ozturk

How can I do it?

yea did it. Here is the fix:

$cc = $kullaniciisim.SamAccountName $cc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM