PowerShell command to import Module and Get-ADUser
PS C:\Users\adm_shahidul> Get-Module -ListAvailable
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 2.0.0.0 AppLocker {Get-AppLockerFile...
Manifest 2.0.0.0 Appx {Add-AppxPackage, ...
Manifest 1.0 BestPractices {Get-BpaModel, Get...
Manifest 1.0.0.0 BitsTransfer {Add-BitsFile, Com...
Manifest 1.0.0.0 BranchCache {Add-BCDataCacheEx...
Manifest 1.0.0.0 CimCmdlets {Get-CimAssociated...
Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualE...
Script 3.0 Dism {Add-AppxProvision...
Manifest 1.0.0.0 DnsClient {Resolve-DnsName, ...
Manifest 2.0.0.0 International {Get-WinDefaultInp...
Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPo...
Manifest 2.0.0.0 IscsiTarget {Add-ClusteriSCSIT...
Script 1.0.0.0 ISE {New-IseSnippet, I...
Manifest 1.0.0.0 Kds {Add-KdsRootKey, G...
Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get...
Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript,...
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clea...
Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl,...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Form...
Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCred...
Manifest 1.0 MMAgent {Disable-MMAgent, ...
Manifest 1.0.0.0 MsDtc {New-DtcDiagnostic...
Manifest 2.0.0.0 NetAdapter {Disable-NetAdapte...
Manifest 1.0.0.0 NetConnection {Get-NetConnection...
Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSessi...
Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMe...
Manifest 1.0.0.0 NetNat {Get-NetNat, Get-N...
Manifest 2.0.0.0 NetQos {Get-NetQosPolicy,...
Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChang...
Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam...
Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress,...
Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionS...
Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCer...
Manifest 1.0 NFS {Get-NfsMappedIden...
Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, S...
Manifest 1.0.0.0 PKI {Add-CertificateEn...
Manifest 1.1 PrintManagement {Add-Printer, Add-...
Manifest 1.0 PSDesiredStateConfiguration {Set-DscLocalConfi...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, ...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, A...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExe...
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 2.0.0.0 RemoteDesktop {Get-RDCertificate...
Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask...
Manifest 2.0.0.0 SecureBoot {Confirm-SecureBoo...
Script 1.0.0.0 ServerCore {Get-DisplayResolu...
Script 2.0.0.0 ServerManager {Get-WindowsFeatur...
Cim 1.0.0.0 ServerManagerTasks {Get-SMCounterSamp...
Manifest 2.0.0.0 SmbShare {Get-SmbShare, Rem...
Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessCli...
Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, ...
Manifest 1.0.0.0 StartScreen {Export-StartLayou...
Manifest 2.0.0.0 Storage {Add-InitiatorIdTo...
Manifest 2.0.0.0 TLS {New-TlsSessionTic...
Manifest 1.0.0.0 TroubleshootingPack {Get-Troubleshooti...
Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm, Initiali...
Manifest 1.0.0.0 UserAccessLogging {Enable-Ual, Disab...
Manifest 2.0.0.0 VpnClient {Add-VpnConnection...
Manifest 1.0.0.0 Wdac {Get-OdbcDriver, S...
Manifest 1.0.0.0 WebAdministration {Start-WebCommitDe...
Manifest 2.0.0.0 Whea {Get-WheaMemoryPol...
Manifest 1.0.0.0 WindowsDeveloperLicense {Get-WindowsDevelo...
Script 1.0 WindowsErrorReporting {Enable-WindowsErr...
Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearch...
Directory: C:\Program Files\AppFabric 1.1 for Windows
Server\PowershellModules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0 DistributedCacheAdministration {Connect-AFCacheCl...
Manifest 1.0 DistributedCacheConfiguration {Get-AFCacheCluste...
PS C:\Users\adm_shahidul> Import-Module ServerManager
PS C:\Users\adm_shahidul> Add-WindowsFeature -Name "RSAT-AD-PowerShell" -Include
AllSubFeature
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No Success {Active Directory module for Windows P...
PS C:\Users\adm_shahidul> Import-Module Activedirectory
PS C:\Users\adm_shahidul> Get-ADUser -filter * -properties PasswordExpired, Pass
wordLastSet, PasswordNeverExpires | where {$_.name -like "*islam*"} | ft Name,
PasswordExpired, PasswordLastSet, PasswordNeverExpires
PS C:\Users\adm_shahidul> Get-ADUser -filter * -properties PasswordExpired, Pass
wordLastSet, PasswordNeverExpires | where {$_.name -like "*shahidul*"} | ft Nam
e, PasswordExpired, PasswordLastSet, PasswordNeverExpires
Name PasswordExpired PasswordLastSet PasswordNeverExpire
s
---- --------------- --------------- -------------------
adm_shahidul False 8/2/2016 12:41:0... False
PS C:\Users\adm_shahidul> Get-ADUser -filter * -properties PasswordExpired, Pass
wordLastSet, PasswordNeverExpires | where {$_.name -like "*mannermaa*"} | ft Na
me, PasswordExpired, PasswordLastSet, PasswordNeverExpires
Name PasswordExpired PasswordLastSet PasswordNeverExpire
s
---- --------------- --------------- -------------------
kmannermaa False 4/11/2017 4:39:5... False
PS C:\Users\adm_shahidul>
Comments
Post a Comment