< Back

ConvertTo-HashtableFromPsCustomObject

Fri Jan 10, 2020 8:38 pm

NAME ConvertTo-HashtableFromPsCustomObject



SYNTAX

ConvertTo-HashtableFromPsCustomObject [-PSCustomObject] <Object[]> [<CommonParameters>]





PARAMETERS

-PSCustomObject <Object[]>



Required? true

Position? 0

Accept pipeline input? true (ByValue, ByPropertyName)

Parameter set name (All)

Aliases None

Dynamic? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).





INPUTS

System.Object[]





OUTPUTS

System.Collections.Hashtable





ALIASES

None





REMARKS

None





examples : @{example=System.Management.Automation.PSObject[]}

returnValues : @{returnValue=@{type=@{name=System.Management.Automation.PSObject}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=Get-ADUserGroups; description=System.Management.Automation.PSObject[]}

description : {@{Text=Retrieves all groups user belongs to from specified OU. If no OU is specified then domain root

is set as default.}}

syntax : @{syntaxItem=@{name=Get-ADUserGroups; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : Get-ADUserGroups

Category : Function

Synopsis : Retrieves all groups user belongs to from specified OU.

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=@{introduction=System.Management.Automation.PSObject[]; code=;

remarks=System.Management.Automation.PSObject[]; title=-------------------------- EXAMPLE 1

--------------------------}}

inputTypes : @{inputType=@{type=@{name=}}}

syntax : @{syntaxItem=@{name=Get-FunctionTemplate; parameter=@{name=ComputerName; parameterValue=String[];

required=true; globbing=false; pipelineInput=true (ByValue, ByPropertyName); position=1}}}

parameters : @{parameter=@{defaultValue=; parameterValue=String[]; name=ComputerName; type=@{name=String[]};

required=true; globbing=false; pipelineInput=true (ByValue, ByPropertyName); position=1}}

details : @{name=Get-FunctionTemplate}

returnValues : @{returnValue=@{type=@{name=}}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : Get-FunctionTemplate

Category : Function

Synopsis :

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=@{introduction=System.Management.Automation.PSObject[]; code=;

remarks=System.Management.Automation.PSObject[]; title=-------------------------- EXAMPLE 1

--------------------------}}

inputTypes : @{inputType=@{type=@{name=}}}

syntax : @{syntaxItem=@{name=Get-FunctionTemplateV5; parameter=@{name=ComputerName; parameterValue=String[];

required=true; globbing=false; pipelineInput=true (ByValue, ByPropertyName); position=1}}}

parameters : @{parameter=@{defaultValue=; parameterValue=String[]; name=ComputerName; type=@{name=String[]};

required=true; globbing=false; pipelineInput=true (ByValue, ByPropertyName); position=1}}

details : @{name=Get-FunctionTemplateV5}

returnValues : @{returnValue=@{type=@{name=}}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : Get-FunctionTemplateV5

Category : Function

Synopsis :

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=System.Management.Automation.PSObject[]}

returnValues : @{returnValue=@{type=@{name=System.Void}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=New-ArcModule; description=System.Management.Automation.PSObject[]}

description : {@{Text=Creates basic module with files downloaded from mczerniawski\\BuildModule github repo.}}

syntax : @{syntaxItem=@{name=New-ArcModule; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : New-ArcModule

Category : Function

Synopsis : Creates scaffolding for new module.

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=@{introduction=System.Management.Automation.PSObject[]; code=New-SQLDBLogin -SQLServer

Server1 -Database DB1 -User domain\\user1 -dbRole db_owner;

remarks=System.Management.Automation.PSObject[]; title=-------------------------- EXAMPLE 1

--------------------------}}

returnValues : @{returnValue=@{type=@{name=System.Void}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=New-SQLDBLogin; description=System.Management.Automation.PSObject[]}

description : {@{Text=If given SQL and DB are valid it will:

1. Check if user exists on SQL server. If so it will:

2. Check if dabatase contains user. If not - will add.

3. Check if database role contains user - if not it will add.}}

syntax : @{syntaxItem=@{name=New-SQLDBLogin; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : New-SQLDBLogin

Category : Function

Synopsis : This will add user to SQL db role on given database.

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=System.Management.Automation.PSObject[]}

returnValues : @{returnValue=@{type=@{name=System.Void}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=New-SQLLogin; description=System.Management.Automation.PSObject[]}

description : {@{Text=It does the following:

1. If no SQL instance is provided it queries server for sql istances and selects if only one exists.

If there are more than 1 instance - exists.

2. Checks if login already exists on server. If not - creates one.

3. Checks if provided SQL role is valid. If yes - checks if user is already a member of the role. if

not - adds the user to specified sql role.}}

syntax : @{syntaxItem=@{name=New-SQLLogin; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : New-SQLLogin

Category : Function

Synopsis : Will create login in sql server. Optionally will add it to specified role.

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=@{introduction=System.Management.Automation.PSObject[]; code=$ReservationList =@{;

remarks=System.Management.Automation.PSObject[]; title=-------------------------- EXAMPLE 1

--------------------------}}

returnValues : @{returnValue=@{type=@{name=System.Void}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=Set-DHCPReservation; description=System.Management.Automation.PSObject[]}

description : {@{Text=Checks if IP or MAC is already assigned. If not - creates a dhcp reservation.}}

syntax : @{syntaxItem=@{name=Set-DHCPReservation; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : Set-DHCPReservation

Category : Function

Synopsis : Creates DHCP reservation for given parameters.

Component :

Role :

Functionality :

ModuleName : ArcAdminTools





examples : @{example=System.Management.Automation.PSObject[]}

returnValues : @{returnValue=@{type=@{name=System.Void}}}

parameters : @{parameter=System.Management.Automation.PSObject[]}

details : @{name=Set-DHCPScope; description=System.Management.Automation.PSObject[]}

description : {@{Text=If given scope doesn't exists it's created. Then Scope values are set. Then Exclusions are

created.}}

syntax : @{syntaxItem=@{name=Set-DHCPScope; parameter=System.Management.Automation.PSObject[]}}

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

Name : Set-DHCPScope

Category : Function

Synopsis : Create DHCP scope on given server

Component :

Role :

Functionality :

ModuleName : ArcAdminTools