onelinecommand

  • Home
  • Contact
  • About
  • List Federated Microsoft Teams in Powershell

    (Get-CsTenantFederationConfiguration).alloweddomains.alloweddomain

    premkumarsubramaniyan

    August 11, 2022
    Active Directory
    Microsoft Teams
  • Get-MSOLUSERS MFA Status From Import-CSV

    $UserPrincipalName=import-csv c:\temp\TEST-MFA-Enrolled.csv $UserPrincipalName.foreach( { Get-MsolUser -UserPrincipalName $_.Name | where {$_.StrongAuthenticationMethods -like “strong“} } ) | Export-Csv “C:\Temp\User-TO-BE-Added-EnrolledGroup.csv”

    premkumarsubramaniyan

    February 28, 2022
    Active Directory
  • List The Extension Attributes in AZURE-AD

    Get-EXORecipient -ResultSize unlimited  -PropertySets Custom | Select Identity,CustomAttribute8,CustomAttribute12,CustomAttribute15

    premkumarsubramaniyan

    November 18, 2021
    Exchange online
  • Install Application

    #start the following Windows services in the specified order: [Array] $Services = ‘abc’,’abc’; #The KSASvcChk checks the status of both Kaseya services (Kaseya Agent:’KAKSAAS143744567159389′, Kaseya Agent Endpoint:’KAENDKSAAS143744567159389′) and outputs the status of both function KSASvcChk{ #Service Name paramater param($ServiceName) $arrService = Get-Service -Name $ServiceNameif ($arrService.Status -ne “Running”){Write $false}if ($arrService.Status -eq “running”){Write $true}else {Write $false}} #The…

    premkumarsubramaniyan

    November 9, 2021
    Active Directory
  • GET AD Extension Attributes For All Users in Domain

    Get-ADUser -Filter * -Properties * | Select Displayname,sAMAccountName, extensionAttribute15, extensionAttribute6,CanonicalName,proxyAddresses,UserPrincipalName

    premkumarsubramaniyan

    November 9, 2021
    AD
  • Inheritance user permissions to all organizations Units recursively

    OU –> Properties –> Security –> add user or group –>then click on user or group –> Advance –> select same account –> Applies to “This object and All Descendant Objects

    premkumarsubramaniyan

    November 1, 2021
    Active Directory
  • Use Multiple Filters in Powershell

    $ou=’OU=subou3,OU=subou2,OU=subou1,DC=domain,DC=com’$filter = @(“machinename1”, “machinename2”)$compute= Get-ADComputer -Filter * -SearchBase $ou | where-object{$filter -contains $_.name}

    premkumarsubramaniyan

    November 1, 2021
    Active Directory
  • Start the services in Any windows machines

    start the following Windows services in the specified order: [Array] $Services = ‘winrm’,’TermService’; loop through each service, if its not running, start it foreach($ServiceName in $Services){$arrService = Get-Service -Name $ServiceNamewrite-host $ServiceNamewhile ($arrService.Status -ne ‘Running’){Start-Service $ServiceNamewrite-host $arrService.statuswrite-host ‘Service starting’Start-Sleep -seconds 60$arrService.Refresh()if ($arrService.Status -eq ‘Running’){Write-Host ‘Service is now Running’}}}

    premkumarsubramaniyan

    October 28, 2021
    Active Directory
Previous Page
1 2

Blog at WordPress.com.

  • Subscribe Subscribed
    • onelinecommand
    • Already have a WordPress.com account? Log in now.
    • onelinecommand
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar