-->

ABOUT US

Our development agency is committed to providing you the best service.

OUR TEAM

The awesome people behind our brand ... and their life motto.

  • Kumar Atul Jaiswal

    Ethical Hacker

    Hacking is a Speed of Innovation And Technology with Romance.

  • Kumar Atul Jaiswal

    CEO Of Hacking Truth

    Loopholes are every major Security,Just need to Understand it well.

  • Kumar Atul Jaiswal

    Web Developer

    Techonology is the best way to Change Everything, like Mindset Goal.

OUR SKILLS

We pride ourselves with strong, flexible and top notch skills.

Marketing

Development 90%
Design 80%
Marketing 70%

Websites

Development 90%
Design 80%
Marketing 70%

PR

Development 90%
Design 80%
Marketing 70%

ACHIEVEMENTS

We help our clients integrate, analyze, and use their data to improve their business.

150

GREAT PROJECTS

300

HAPPY CLIENTS

650

COFFEES DRUNK

1568

FACEBOOK LIKES

STRATEGY & CREATIVITY

Phasellus iaculis dolor nec urna nullam. Vivamus mattis blandit porttitor nullam.

PORTFOLIO

We pride ourselves on bringing a fresh perspective and effective marketing to each project.

Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts
  • PowerShell for Windows Server Administration: Commands, Help, Modules & Practical Guide

     

    PowerShell for Windows Server Administration

     

    PowerShell for Windows Server Administration: Commands, Help, Modules & Practical Guide


    If you are preparing for a System Engineer, Infrastructure Engineer, Systems Administrator, or Windows Server Administrator role, PowerShell is one of the most useful skills you can learn.

    Windows administrators traditionally perform many tasks through graphical tools such as Server Manager, Computer Management, Active Directory Users and Computers, Event Viewer, and Control Panel. However, PowerShell provides a powerful command-line environment that allows administrators to automate repetitive tasks, manage servers, retrieve system information, troubleshoot problems, and work with Microsoft technologies.

    In this article, I will cover the fundamentals of PowerShell for Windows Server Administration, including the PowerShell versions, basic commands, help system, modules, profiles, functions, and some practical commands that I tested during my learning.

    What Is PowerShell?


    PowerShell is Microsoft's command-line shell and scripting language designed for system administration and automation.

    Unlike traditional Command Prompt, PowerShell works with objects rather than only text.

    For example: 

    • Get-Process


    This command retrieves running processes from the computer.

    You can then use other PowerShell commands to filter, sort, export, or manipulate that information.
    This object-based approach makes PowerShell extremely useful for Windows administration.



    Why Should a System Engineer Learn PowerShell?


    PowerShell is particularly useful for system engineers and administrators because many administrative tasks can be automated.


    Some common tasks include:

    • Managing Windows servers
    • Managing users and groups
    • Working with Active Directory
    • Managing services
    • Checking running processes
    • Managing disks
    • Checking system information
    • Managing Windows features
    • Working with networking
    • Troubleshooting Windows
    • Managing Microsoft 365
    • Managing Azure resources
    • Automating repetitive administrative tasks


    Instead of manually performing the same task through a GUI hundreds of times, PowerShell can often complete the task with a command or script.


    Alternative Job Titles for System Engineer


    When searching for IT infrastructure jobs, don't search only for System Engineer.
    Organizations may use different job titles for similar infrastructure responsibilities.

    1. Infrastructure Engineer


    An Infrastructure Engineer generally works with:

    • Servers
    • Networking
    • Storage
    • Virtualization
    • Cloud infrastructure
    • Enterprise hardware


    2. Systems Administrator


    A Systems Administrator is responsible for the day-to-day administration of systems.

    Typical responsibilities include:


    • User management
    • Server maintenance
    • Software installation
    • Troubleshooting
    • Backup management
    • Security configuration


    3. Site Reliability Engineer — SRE


    An SRE focuses heavily on reliability, availability, monitoring, automation, and software-based infrastructure management.

    SRE roles generally require stronger knowledge of:

    • Linux
    • Cloud
    • Programming/scripting
    • CI/CD
    • Monitoring
    • Automation


    4. DevOps Engineer


    A DevOps Engineer works between development and operations.

    Common technologies include:

    • Git
    • CI/CD
    • Docker
    • Kubernetes
    • Cloud platforms
    • Infrastructure as Code
    • PowerShell/Bash/Python


    5. Platform Engineer


    Platform Engineers build and maintain internal platforms and infrastructure used by development teams.

     

    Checking the PowerShell Version


    The first command I recommend running when learning PowerShell is:

    $PSVersionTable

     

     


     



    This displays information about the currently installed PowerShell environment.

    You can see information such as:

    • PowerShell version
    • Edition
    • Operating system
    • Compatible versions
    • Platform information


    For example:

    • $PSVersionTable


    The important property for beginners is:

    • PSVersion


    This tells you which version of PowerShell you are currently using.


    PowerShell 5.1 vs PowerShell 7


    There are two important PowerShell versions you will encounter.

    Windows PowerShell 5.1

    Windows PowerShell 5.1 is the traditional Windows PowerShell version that comes with Windows.

    You can normally launch it using:

    • powershell.exe
    • PowerShell 7


    PowerShell 7 is the newer, cross-platform version of PowerShell.

    You can launch it using:

    • pwsh


    PowerShell 7 can run on:

    • Windows
    • Linux
    • macOS


    However, when working with Windows Server administration, you should understand that PowerShell 5.1 and PowerShell 7 are not identical.

    Some older Windows administration modules were designed specifically around Windows PowerShell 5.1.


    Installing PowerShell 7 with Winget



    If PowerShell 7 is not installed, you can search for it using Windows Package Manager:

    • winget search Microsoft.PowerShell

     

    PowerShell for Windows Server Administration: Commands, Help, Modules & Practical Guide

     

     


    Then install it using:

    • winget install --id Microsoft.Powershell --source winget


     

    PowerShell for Windows Server Administration: Commands, Help, Modules & Practical Guide

      

    After installation, you can launch PowerShell 7 with:

    • pwsh


     

    PowerShell for Windows Server Administration

     

     

    You can then verify the version:

    • $PSVersionTable


    Tip: When following older Windows Server administration tutorials, always check whether the instructor is using Windows PowerShell 5.1 or PowerShell 7.


    How to Find PowerShell Commands

    • PowerShell contains thousands of commands and cmdlets.
    • Trying to memorize all of them is unnecessary.
    • Instead, learn how to find commands.


    The most useful command is:

    • Get-Command


    It displays commands available in your current PowerShell environment.

    For example:

    • Get-Command


    If the output is long, you can pipe it to:

    • Get-Command | more

     

    PowerShell for Windows Server Administration 

     This allows you to view the results page by page.

     

    Understanding PowerShell Verb-Noun Naming


    PowerShell commands generally follow a Verb-Noun naming convention.

    Examples:

    • Get-Process
    • Get-Service
    • Get-Disk
    • Get-Date
    • Set-Date
    • New-Item
    • Remove-Item
    • Start-Service
    • Stop-Service


    This naming convention makes PowerShell commands easier to understand.

    For example:

    • Get + Process

    means:

    Get information about processes.

    Similarly:

    • Get + Service

    means:

    Get information about services.

    Learning common PowerShell verbs makes discovering commands much easier.

     

    Getting Help in PowerShell


    One of the most important skills for PowerShell administration is knowing how to use its built-in help system.

    You don't need to remember every parameter of every command.

    Instead, use:

    • Get-Help


    For example:

    • Get-Help Get-Process

     

    PowerShell for Windows Server Administration

      

    This provides information about the Get-Process cmdlet.

    You can also use:

    • help Get-Process


    PowerShell also supports searching for commands based on partial names.

    For example:

    • Get-Help Set-A*


    This can help you discover commands beginning with Set-A.



    Updating PowerShell Help


    PowerShell includes downloadable help documentation.

    To download the latest help files, use:

    • Update-Help


    This updates the help content available to PowerShell.

    You may need to run PowerShell with appropriate privileges depending on your environment.

    After updating the help files, you can use:

    • Get-Help Get-Process

    This is an excellent habit when learning a new cmdlet.

    Practical Example: Get-Date

    Let's look at a simple PowerShell command.

    • Get-Date


    This displays the current date and time.

    You can also control how the output is displayed.

    For example:

    • Get-Date -Format "HH:mm:ss"


    This displays the current time in:

    Hours:Minutes:Seconds

    For example:

    • 01:36:25


    The -Format parameter allows you to specify the desired date/time format.

    Saving PowerShell Output to a File

    PowerShell can redirect command output to a file.

    For example:

    • Get-Date -Format "HH:mm:ss" | Out-File C:\data\time.txt


    Here we are using the pipeline:

    • Get-Date → Out-File


    The result is written to:

    • C:\data\time.txt


    This concept becomes extremely important when creating administration scripts and reports.

    Understanding the PowerShell Pipeline

    The pipeline is one of the most powerful features of PowerShell.

    The pipe symbol is:

    |

    It sends the output of one command to another command.

    For example:

    • Get-Process | more

     

    PowerShell for Windows Server Administration

     

     


    The output from Get-Process is passed to more.

    Another example:

    • Get-Date -Format "HH:mm:ss" | Out-File C:\data\time.txt


    The output from Get-Date is passed to Out-File.

    As you progress into PowerShell administration, you will use pipelines extensively.



    Checking PowerShell History


    PowerShell keeps a history of commands executed during the current session.

    Use:

    • Get-History


    This displays previously executed commands.

    This is useful when:

    • You forgot a command you just executed
    • You want to repeat a command
    • You are troubleshooting
    • You are documenting your administration work


    For example:

    • Get-History


    can show the commands that you recently ran.



    Checking Disk Information


    PowerShell also provides cmdlets for managing and inspecting hardware resources.

    For example:

    • Get-Disk


    This displays information about disks connected to the system.

    Depending on your system, you may see information such as:

    • Disk number
    • Disk size
    • Operational status
    • Partition style
    • Provisioning type


    For Windows Server administration, disk management is an important area because administrators frequently work with storage, partitions, volumes, and file systems.



    What Is a PowerShell Module?


    A PowerShell module is a package that can contain:

    • Cmdlets
    • Functions
    • Variables
    • Aliases
    • Other PowerShell resources


    Modules extend PowerShell's capabilities.

    For example, Windows administrators may use modules for:

    • Active Directory
    • Hyper-V
    • Microsoft 365
    • Azure
    • Networking
    • Windows administration


    To see modules available in your environment, you can use:

    • Get-Module -ListAvailable


    To see modules currently loaded into the session:

    • Get-Module


    Important clarification


    A common beginner mistake is confusing Get-Module with "adding a module."

    Get-Module gets information about modules.

    To load a module into the current session, you typically use:

    • Import-Module ModuleName


    For example:

    Import-Module ActiveDirectory



    PowerShell for Windows Server Administration


    What Is a PowerShell Profile?


    A PowerShell profile is a script that runs when PowerShell starts.

    It can be used to store personal configuration and customizations.

    For example, you could configure your PowerShell environment so that certain functions or aliases are automatically available whenever you start a new session.

    This gives you an important advantage:

    Your settings and customizations can be loaded automatically in future PowerShell sessions.

    You can check whether a profile exists using:

    • Test-Path $PROFILE


    You can view the profile path using:

    • $PROFILE

     

    What Is a PowerShell Function?


    A function is a reusable block of PowerShell code.

    Functions are particularly useful when you repeatedly perform the same operation.

    For example:

    function Get-MyComputerInfo {
        Get-ComputerInfo
    }

    After creating the function, you can run:

    • Get-MyComputerInfo


    Instead of repeatedly typing a complicated sequence of commands, you can create a function and call it using a short name.

    Think of a function as:

    A reusable shortcut for a set of PowerShell commands.

    Functions become extremely useful as you start writing administration scripts.


    PowerShell Knowledge Check


    During my learning, I also reviewed some basic PowerShell questions.

    1. What cmdlet is used to get information about modules?

    • Get-Module


    2. What command downloads the latest PowerShell help files?

    • Update-Help


    3. What is an advantage of adding a PowerShell profile?

    • A profile allows you to save configurations, functions, aliases, and other customizations so they can be loaded automatically in future sessions.


    4. What is the default Windows PowerShell version commonly associated with Windows Server?

    • Windows PowerShell 5.1 is the built-in Windows PowerShell version on modern Windows Server releases, although newer PowerShell versions can also be installed separately.


    5. What is a PowerShell function?

    • A function is a reusable block of PowerShell code that can simplify repetitive or complicated operations.

     

    PowerShell Commands I Practiced


    Here is a quick summary of the commands covered in this learning session:

     

    PowerShell for Windows Server Administration

     

    My Practical PowerShell Learning


    The commands covered in this article are not just theoretical concepts. I practiced them directly in a Windows environment to understand how PowerShell behaves and how administrators can use it for everyday system administration.

    Some of the commands I practiced included:

    $PSVersionTable
    
    Get-Command | more
    
    Get-Help Get-Process
    
    Update-Help
    
    Get-Date -Format "HH:mm:ss"
    
    Get-Date -Format "HH:mm:ss" | Out-File C:\data\time.txt
    
    Get-History
    
    Get-Disk
    

     

    These basic commands form a good foundation before moving into more advanced Windows Server administration. 

     

     

    What's Next in My PowerShell Learning?

    After understanding the fundamentals, the next step is to move from basic commands into real Windows Server administration.

    The areas I plan to explore include:

    Windows Server

    • Server management
    • Windows services
    • Event Viewer
    • Windows Features
    • Server roles
    • Storage management


    Active Directory

    • Users
    • Groups
    • Organizational Units
    • Password policies
    • User management
    • Group Policy


    Networking

    • IP configuration
    • DNS
    • DHCP
    • Network adapters
    • Firewall
    • Connectivity troubleshooting


    Automation

    • PowerShell scripts
    • Functions
    • Variables
    • Loops
    • Conditional statements
    • Error handling
    • Scheduled tasks


    Advanced Administration

    • Remote Server Administration
    • PowerShell Remoting
    • Windows Server automation
    • Microsoft 365 administration
    • Azure administration


    Conclusion


    PowerShell is an essential technology for anyone interested in Windows Server Administration, System Engineering, Infrastructure Engineering, or IT Operations.

    The most important lesson for beginners is that you don't need to memorize thousands of commands. Instead, learn how to discover commands, read documentation, understand parameters, use the pipeline, and build reusable functions.

    Commands such as:

    • Get-Command
    • Get-Help
    • Get-Module
    • Get-Process
    • Get-Service
    • Get-Disk


    can become your everyday tools as a Windows administrator.

    The next step is to take these fundamentals into a practical Windows Server lab and start managing users, groups, services, Active Directory, DNS, DHCP, storage, networking, and Group Policy using PowerShell.

    That is where PowerShell starts becoming a real System Engineer skill, rather than simply another command-line tool. 

     

     

     

  • Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More

     

    Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More

     

    A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More

     
    There are PowerShell verb names used to make cmdlets predictable. PowerShell provides many standard verbs such as Get, Set, New, Find, Search, Read, Invoke, Start, Add, Clear, Close, Copy, and Enter. Each verb represents a different type of operation. For example, Get is generally used to retrieve information, Set modifies an existing configuration, New creates a new object, Start begins a service or process, and Copy creates a copy of an existing file or resource. Understanding these verbs helps administrators predict what a command is likely to do. 

     

    1. Get - retrieve information


    This is probably the most important PowerShell verb.

    Get-Service

    Get a particular service:
    Get-Service -Name Spooler


     

    Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More


    Get processes:
    Get-Process

    Get local users:
    Get-LocalUser


    Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More


    Think:

    Get = Show me information.

     

    2. Set — change something


    For example:

    Set-Service -Name Spooler -StartupType Automatic

    You're changing the startup type of the Spooler service.

    You'll see something like:

      
    Name     State    StartMode
    ----     -----    ---------
    Spooler  Running  Auto
      

     

    • Name → service name
    • State → whether it's currently Running or Stopped
    • StartMode → how Windows starts it (Auto, Manual, Disabled)

     

    Even you check by GUI -> win + r -> services.msc -> Find Print Spooler or Spooler -> right click on this service ->  Properties

     

    Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More

     


    Think:

    Set = Change existing information.


    3. New — create something


    Create a folder:

    New-Item -Path C:\Data\Test -ItemType Directory

    Create a file:

    New-Item -Path C:\Data\Test.txt -ItemType File


    In Active Directory:

    New-ADUser -Name "John Smith" -SamAccountName jsmith


    Think:

    New = Create something that doesn't exist yet. 

     

    4. Find — find a resource


    A good PowerShell example is:

    Find-Module -Name Pester

    This searches the PowerShell Gallery for the module.


    Mastering PowerShell Commands: A Practical Guide to Get, Set, New, Invoke, Start, Add, Copy, Clear & More

    Another example:

    Find-Command -Name Get-ADUser

    This helps find which module provides a command.

    Think:

    Find = Locate a PowerShell resource. 

     

    5. Search — search data/resources


    For Active Directory:

    Search-ADAccount -LockedOut

    This searches AD for locked-out accounts.

    Another useful example:

    Search-ADAccount -PasswordExpired

    Think:

    Search = Search for specific conditions/data.

    Important: Find and Search aren't interchangeable. The exact availability of these verbs depends on the installed module/cmdlets. 

     

    6. Read — read input/data



    A common example is:

    Read-Host "Enter your username"

    It waits for the administrator to enter something.

    For example:

    $name = Read-Host "Enter your name"

    Then:

    $name

    Think:

    Read = Receive/read information. 

     

     7. Invoke — execute something


    This is extremely important for System Administrators.

    For example, execute a command on a remote server:

    Invoke-Command -ComputerName SERVER01 -ScriptBlock {
        Get-Service
    }


    PowerShell connects to SERVER01 and executes:

    Get-Service

    You can also invoke a command locally:

    Invoke-Command -ScriptBlock {
        Get-ComputerInfo
    }


    Think:

    Invoke = Execute something.

     

    8. Start — start something


    Start a Windows service:

    Start-Service -Name Spooler

    Start a process:

    Start-Process notepad.exe

    Think:

    Start = Start an operation/process/service. 

     

     9. Add — add something


    Add a user to a local group:

    Add-LocalGroupMember -Group "Administrators" -Member "Atul"

    For Active Directory:

    Add-ADGroupMember -Identity "IT-Users" -Members tom

    Think:

    Add = Add an object/member to something.

     

    10. Clear — clear contents


    Clear a text file without deleting the file:

    Clear-Content C:\Data\log.txt

    The file remains, but its contents are removed.

    Clear the PowerShell screen:

    Clear-Host

    Usually you'll see:

    cls

    which is an alias for Clear-Host.

    Think:

    Clear = Remove existing contents without necessarily deleting the object. 

     

     11. Close — close something


    For example, with SMB:

    Close-SmbSession -SessionId 5

    This closes a particular SMB session.

    Think:

    Close = Close an existing connection/session/resource.


    12. Copy — copy something


    Copy a file:

    Copy-Item C:\Data\report.txt C:\Backup\

    Copy a folder:

    Copy-Item C:\Data C:\Backup -Recurse

    Think:

    Copy = Create a copy somewhere else.

     


    For Currently Logged-in User

     

    Get-CimInstance Win32_LoggedOnUser 

     

     13. Enter — enter a session


    This one is particularly important for Windows administration.

    Enter-PSSession -ComputerName SERVER01

    You'll enter an interactive PowerShell session on SERVER01.

    Your prompt may change to something like:

    [SERVER01]: PS C:\Users\Administrator>

    Now:

    Get-Service

    runs on SERVER01, not your local computer.

    To leave:

    Exit-PSSession

    Think:

    Enter = Enter an interactive session/environment.

     

    The pattern you should remember


    PowerShell cmdlets generally follow: 

    VERB - Noun

    For Example:
     

    Get       - Service
    Set       - Service
    Start     - Service
    Stop      - Service
    
    Get       - Process
    Stop      - Process
    Start     - Process
    
    Get       - LocalUser
    New       - LocalUser
    Set       - LocalUser
    Remove    - LocalUser
    

     

    This makes PowerShell much easier to learn.

    Instead of memorizing hundreds of commands individually, understand the verb + noun pattern. 

     


    💡 Why PowerShell?


    For a Windows Administrator, PowerShell isn't just about knowing commands. It's about using automation and scripting to troubleshoot systems, manage users and services, collect information, and perform repetitive administrative tasks efficiently. 

     


  • 5 PowerShell Commands Every Windows Administrator Should Know

     

    5 PowerShell Commands Every Windows Administrator Should Know

      

    5 PowerShell Commands Every Windows Administrator Should Know 



    If you're working in Windows Administration or IT Support, PowerShell can save a lot of time by turning repetitive administrative tasks into simple commands.

    Here are 5 PowerShell commands I'm currently practicing:


    1. Get-Service


    Check Windows services and their current status.

    Get-Service


    5 PowerShell Commands Every Windows Administrator Should Know

     

    Useful when troubleshooting services that are stopped or not responding.

    Get-Service -Name Spooler

    Get-Service | Where-Object Name -eq "Spooler"

    (Get-Service -Name Spooler).Status



    2. Get-Process


    View running processes and identify applications consuming system resources.

    Get-Process

    Useful for investigating CPU, memory, or application-related issues.

    Get-Process -Name pwsh


    5 PowerShell Commands Every Windows Administrator Should Know



    3. Get-ComputerInfo


    Retrieve detailed information about the Windows system.

    Get-ComputerInfo

    Useful for system inventory and troubleshooting.

     

    5 PowerShell Commands Every Windows Administrator Should Know

    4. Get-WinEvent


    Query Windows Event Logs to investigate system and application issues.

    Get-WinEvent -LogName System -MaxEvents 20


     

     

    5 PowerShell Commands Every Windows Administrator Should Know

    This is especially useful when troubleshooting unexpected errors, service failures, or system events.

    5. Get-LocalUser


    View local user accounts configured on a Windows machine.

    Get-LocalUser

     

     

    5 PowerShell Commands Every Windows Administrator Should Know



    Useful for basic local account administration and auditing.


    6. Get-PrinterDriver


    Open Powershell or pwsh and to list all installed driver names on your system. 


    PS C:\Windows\System32> Get-PrinterDriver
    
    Name                                PrinterEnvironment MajorVersion    Manufacturer
    ----                                ------------------ ------------    ------------
    Microsoft XPS Document Writer v4    Windows x64        4               Microsoft
    Microsoft Software Printer Driver   Windows x64        4               Microsoft
    Microsoft Print To PDF              Windows x64        4               Microsoft
    Send To Microsoft OneNote 2010 Dri… Windows x64        3
    Microsoft Shared Fax Driver         Windows x64        3               Microsoft
    Microsoft enhanced Point and Print… Windows x64        3               Microsoft
    Microsoft enhanced Point and Print… Windows NT x86     3               Microsoft
    
    PS C:\Windows\System32>
    
    
    






    💡 Why PowerShell?



    For a Windows Administrator, PowerShell isn't just about knowing commands. It's about using automation and scripting to troubleshoot systems, manage users and services, collect information, and perform repetitive administrative tasks efficiently. 

     

  • How to identify my wbs chargecode in powershell windows 11

     

    How to identify my wbs chargecode in powershell windows 11


    How to identify my wbs chargecode in powershell


    A WBS (Work Breakdown Structure) / Charge code is usually not something Powershell can 'discover' automatically from your system because it's company-specific financial/project data (Stored in tools like SAP, ServiceNow, internal portals, or time-tracking systems).


    1. Check Environment Variables (if your organization uses them)

    Some companies push project/charge codes as environment variables.


    Get-ChildItem Env:
    
    
    


    Look for anything like:

    • WBS
    • CHARGECODE
    • PROJECT
    • COSTCENTER



    2. Check Active Directory (if stored in AD)


    Sometimes WBS/cost center is stored as a user attribute.



    Get-ADUser -Identity $env:USERNAME -Properties *
    
    
    


    Look for fields like:

    • department
    • extensionAttributeX
    • employeeID
    • costCenter



    Filter only relevant fields:


    Get-ADUser -Identity $env:USERNAME -Properties  department,extensionAttribute1,extensionAttribute2



    If you got error like as you can see the image below so in screenshot, the error is very clear:

    Get-ADUser : The term 'Get-ADUser' is not recognized



    How to identify my wbs chargecode in powershell windows 11


    ✅ What this means


    Your PowerShell does not have the Active Directory module installed or loaded.

    Get-ADUser comes from the ActiveDirectory module, which is:

    • ✅ Available on domain-joined machines with RSAT installed
    • ❌ Not available by default on normal Windows installs



    ✅ Fix it (step-by-step)


    🔹 Option 1: Check if module exists but not loaded

    Get-Module -ListAvailable ActiveDirectory


    How to identify my wbs chargecode in powershell windows 11


    👉 If you see output well and good but if you are not seeing then leave it as of now.

    Then just import it:

    Import-Module ActiveDirectory


    Option 2: Install RSAT (Most likely needed)


    Since you’re a IT Support Engineer, this is probably your case.

    Run:


    Get-WindowsCapability -Name RSAT.ActiveDirectory* -Online
    
    
    


    How to identify my wbs chargecode in powershell windows 11


    Install it:


    Add-WindowsCapability -Online -Name RSAT.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
    
    
    


    How to identify my wbs chargecode in powershell windows 11



    Option 3: If installation is blocked


    In many corporate environments:

    ❌ You may NOT have permission to install RSAT

    👉 Then:

    Ask IT:

    "Please enable RSAT Active Directory PowerShell module on my machine"


    ✅ After fixing


    Use this correct command 

    👉 Environment variables cannot start with numbers

    ✅ Correct version:

    If your username is your ID:


    Get-ADUser -Identity $env:USERNAME -Properties *
    

    Or explicitly:


    Get-ADUser -Identity 221843 -Properties *
    
    
    



    How to identify my wbs chargecode in powershell windows 11



    How to identify my wbs chargecode in powershell windows 11


    Filter WBS / Charge info (after it works)


    Get-ADUser -Identity $env:USERNAME -Properties * |
    Select-Object Name, Department, Title, extensionAttribute1, extensionAttribute2
    



    Disclaimer



    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.




  • WHAT WE DO

    We've been developing corporate tailored services for clients for 30 years.

    CONTACT US

    For enquiries you can contact us in several different ways. Contact details are below.

    Hacking Truth.in

    • Street :Road Street 00
    • Person :Person
    • Phone :+045 123 755 755
    • Country :POLAND
    • Email :contact@heaven.com

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.