Combining two commands into one and exporting to csv file in Powershell











up vote
0
down vote

favorite












Below is the code I'm using get data from the output of two commands, I then put them into two separate array's. When I combine the arrays the output looks how I would expect, but when I do select and try to output, it has gaps and not formatted correct. How get I get this to output nice to a csv file?



Example code:



   $a = get-agentserver
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."Name" -Split '.(?!d)')[0]
'Policy Type' = $_."AgentServerType"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
}
} | Select "Client Name","Policy Type","Backup State","logon","account"
#$NewCSV

$l = foreach($i in $a.name){
get-definition -agentserver $i}
$l | convertto-csv | out-file t1.csv
$m = import-csv t1.csv | select agentserver,name,selectionsummary
$defcsv = $m | foreach-object{
new-object psobject -prop @{
'Policy Name' = $_.Name
'Backup Selection' = $_.selectionsummary
}
} | select "Policy Name","Backup Selection"
#$defcsv

$hope = $NewCSV + $defcsv
$hope2 = $hope | select "Client Name","Policy Name","Policy Type","Backup Selection"
$hope2


Ex output $hope(that look right to me)



Client Name  : Name
Policy Type : Ndmp
Backup State : Unknown
logon : Succeeded
account : ndmp_user

Policy Name : Diff Bakcup
Backup Selection : COMMON, D: (Partial)


Ex output of $hope2(which is killing me how to fix)



Client Name                   Policy Name                                     Policy Type Backup Selection
----------- ----------- ----------- ----------------
Name Windows
Name Windows
Name Windows
Name Windows
Name Windows
Name Ndmp
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Name e$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Namee$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
Name Backup BLR_Pro... /root_vdm/IN-BLR400-FS-C...


I have cleaned up my code and tried to put my command outputs into one variable and iterate through it in one go, which looks much nicer, but the output result in the same as above in my $hope2 output. It is leaving a big gap under two of the header "Policy Name" and "Backup Selection". Is there a way to use regex to remove those particular spaces only under those two columns in Powershell?



This is the new code I am running using



$agentserver = get-agentserver
$agentserver | convertto-csv | select-object -skip 2 | out-file t2.csv
$agentserver = import-csv t2.csv -Header server,id,type,accountstate,logonaccount
$budefinition = foreach($i in $a.name){
get-backupdefinition -agentserver $i}
$budefinition | convertto-csv | out-file t1.csv
$converted_budef = import-csv t1.csv | select agentserver,name,selectionsummary
$a = $agentserver + $converted_budef
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."server" -Split '.(?!d)')[0]
'Policy Type' = $_."type"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
'Policy Name' = ($_.Name -replace ","," ")
'Backup Selection' = ($_.selectionsummary -replace ","," ")
}
} | Select "Client Name","Policy Name","Policy Type","Backup Selection"
$NewCSV


Example of what I am trying to accomplish would look like this, that I can then use the export-csv and have a nice csv doc.



Client Name Policy Name Policy Type Backup Selection
----------- ----------- ----------- ----------------
NAME Diff Bakup Windows Common D
NAME Archive Ndmp /root_vdm/


After doing $NewCSV | fl I get a output of two separate list as shown below and I need them to all be in one. Any ideas how to fix it in my code above?



Client Name      : Name
Policy Name :
Policy Type : Ndmp
Backup Selection :

Client Name :
Policy Name : Diff Bakcup
Policy Type :
Backup Selection : COMMON D: (Partial)









share|improve this question









New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
    – LotPings
    Nov 17 at 16:07










  • @LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
    – jim wood
    Nov 17 at 18:11










  • What do you get from $hope2 | fl ?
    – Walter Mitty
    Nov 17 at 21:01










  • @WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
    – jim wood
    Nov 18 at 4:08










  • @WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
    – jim wood
    Nov 18 at 12:48















up vote
0
down vote

favorite












Below is the code I'm using get data from the output of two commands, I then put them into two separate array's. When I combine the arrays the output looks how I would expect, but when I do select and try to output, it has gaps and not formatted correct. How get I get this to output nice to a csv file?



Example code:



   $a = get-agentserver
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."Name" -Split '.(?!d)')[0]
'Policy Type' = $_."AgentServerType"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
}
} | Select "Client Name","Policy Type","Backup State","logon","account"
#$NewCSV

$l = foreach($i in $a.name){
get-definition -agentserver $i}
$l | convertto-csv | out-file t1.csv
$m = import-csv t1.csv | select agentserver,name,selectionsummary
$defcsv = $m | foreach-object{
new-object psobject -prop @{
'Policy Name' = $_.Name
'Backup Selection' = $_.selectionsummary
}
} | select "Policy Name","Backup Selection"
#$defcsv

$hope = $NewCSV + $defcsv
$hope2 = $hope | select "Client Name","Policy Name","Policy Type","Backup Selection"
$hope2


Ex output $hope(that look right to me)



Client Name  : Name
Policy Type : Ndmp
Backup State : Unknown
logon : Succeeded
account : ndmp_user

Policy Name : Diff Bakcup
Backup Selection : COMMON, D: (Partial)


Ex output of $hope2(which is killing me how to fix)



Client Name                   Policy Name                                     Policy Type Backup Selection
----------- ----------- ----------- ----------------
Name Windows
Name Windows
Name Windows
Name Windows
Name Windows
Name Ndmp
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Name e$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Namee$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
Name Backup BLR_Pro... /root_vdm/IN-BLR400-FS-C...


I have cleaned up my code and tried to put my command outputs into one variable and iterate through it in one go, which looks much nicer, but the output result in the same as above in my $hope2 output. It is leaving a big gap under two of the header "Policy Name" and "Backup Selection". Is there a way to use regex to remove those particular spaces only under those two columns in Powershell?



This is the new code I am running using



$agentserver = get-agentserver
$agentserver | convertto-csv | select-object -skip 2 | out-file t2.csv
$agentserver = import-csv t2.csv -Header server,id,type,accountstate,logonaccount
$budefinition = foreach($i in $a.name){
get-backupdefinition -agentserver $i}
$budefinition | convertto-csv | out-file t1.csv
$converted_budef = import-csv t1.csv | select agentserver,name,selectionsummary
$a = $agentserver + $converted_budef
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."server" -Split '.(?!d)')[0]
'Policy Type' = $_."type"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
'Policy Name' = ($_.Name -replace ","," ")
'Backup Selection' = ($_.selectionsummary -replace ","," ")
}
} | Select "Client Name","Policy Name","Policy Type","Backup Selection"
$NewCSV


Example of what I am trying to accomplish would look like this, that I can then use the export-csv and have a nice csv doc.



Client Name Policy Name Policy Type Backup Selection
----------- ----------- ----------- ----------------
NAME Diff Bakup Windows Common D
NAME Archive Ndmp /root_vdm/


After doing $NewCSV | fl I get a output of two separate list as shown below and I need them to all be in one. Any ideas how to fix it in my code above?



Client Name      : Name
Policy Name :
Policy Type : Ndmp
Backup Selection :

Client Name :
Policy Name : Diff Bakcup
Policy Type :
Backup Selection : COMMON D: (Partial)









share|improve this question









New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
    – LotPings
    Nov 17 at 16:07










  • @LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
    – jim wood
    Nov 17 at 18:11










  • What do you get from $hope2 | fl ?
    – Walter Mitty
    Nov 17 at 21:01










  • @WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
    – jim wood
    Nov 18 at 4:08










  • @WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
    – jim wood
    Nov 18 at 12:48













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Below is the code I'm using get data from the output of two commands, I then put them into two separate array's. When I combine the arrays the output looks how I would expect, but when I do select and try to output, it has gaps and not formatted correct. How get I get this to output nice to a csv file?



Example code:



   $a = get-agentserver
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."Name" -Split '.(?!d)')[0]
'Policy Type' = $_."AgentServerType"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
}
} | Select "Client Name","Policy Type","Backup State","logon","account"
#$NewCSV

$l = foreach($i in $a.name){
get-definition -agentserver $i}
$l | convertto-csv | out-file t1.csv
$m = import-csv t1.csv | select agentserver,name,selectionsummary
$defcsv = $m | foreach-object{
new-object psobject -prop @{
'Policy Name' = $_.Name
'Backup Selection' = $_.selectionsummary
}
} | select "Policy Name","Backup Selection"
#$defcsv

$hope = $NewCSV + $defcsv
$hope2 = $hope | select "Client Name","Policy Name","Policy Type","Backup Selection"
$hope2


Ex output $hope(that look right to me)



Client Name  : Name
Policy Type : Ndmp
Backup State : Unknown
logon : Succeeded
account : ndmp_user

Policy Name : Diff Bakcup
Backup Selection : COMMON, D: (Partial)


Ex output of $hope2(which is killing me how to fix)



Client Name                   Policy Name                                     Policy Type Backup Selection
----------- ----------- ----------- ----------------
Name Windows
Name Windows
Name Windows
Name Windows
Name Windows
Name Ndmp
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Name e$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Namee$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
Name Backup BLR_Pro... /root_vdm/IN-BLR400-FS-C...


I have cleaned up my code and tried to put my command outputs into one variable and iterate through it in one go, which looks much nicer, but the output result in the same as above in my $hope2 output. It is leaving a big gap under two of the header "Policy Name" and "Backup Selection". Is there a way to use regex to remove those particular spaces only under those two columns in Powershell?



This is the new code I am running using



$agentserver = get-agentserver
$agentserver | convertto-csv | select-object -skip 2 | out-file t2.csv
$agentserver = import-csv t2.csv -Header server,id,type,accountstate,logonaccount
$budefinition = foreach($i in $a.name){
get-backupdefinition -agentserver $i}
$budefinition | convertto-csv | out-file t1.csv
$converted_budef = import-csv t1.csv | select agentserver,name,selectionsummary
$a = $agentserver + $converted_budef
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."server" -Split '.(?!d)')[0]
'Policy Type' = $_."type"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
'Policy Name' = ($_.Name -replace ","," ")
'Backup Selection' = ($_.selectionsummary -replace ","," ")
}
} | Select "Client Name","Policy Name","Policy Type","Backup Selection"
$NewCSV


Example of what I am trying to accomplish would look like this, that I can then use the export-csv and have a nice csv doc.



Client Name Policy Name Policy Type Backup Selection
----------- ----------- ----------- ----------------
NAME Diff Bakup Windows Common D
NAME Archive Ndmp /root_vdm/


After doing $NewCSV | fl I get a output of two separate list as shown below and I need them to all be in one. Any ideas how to fix it in my code above?



Client Name      : Name
Policy Name :
Policy Type : Ndmp
Backup Selection :

Client Name :
Policy Name : Diff Bakcup
Policy Type :
Backup Selection : COMMON D: (Partial)









share|improve this question









New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Below is the code I'm using get data from the output of two commands, I then put them into two separate array's. When I combine the arrays the output looks how I would expect, but when I do select and try to output, it has gaps and not formatted correct. How get I get this to output nice to a csv file?



Example code:



   $a = get-agentserver
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."Name" -Split '.(?!d)')[0]
'Policy Type' = $_."AgentServerType"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
}
} | Select "Client Name","Policy Type","Backup State","logon","account"
#$NewCSV

$l = foreach($i in $a.name){
get-definition -agentserver $i}
$l | convertto-csv | out-file t1.csv
$m = import-csv t1.csv | select agentserver,name,selectionsummary
$defcsv = $m | foreach-object{
new-object psobject -prop @{
'Policy Name' = $_.Name
'Backup Selection' = $_.selectionsummary
}
} | select "Policy Name","Backup Selection"
#$defcsv

$hope = $NewCSV + $defcsv
$hope2 = $hope | select "Client Name","Policy Name","Policy Type","Backup Selection"
$hope2


Ex output $hope(that look right to me)



Client Name  : Name
Policy Type : Ndmp
Backup State : Unknown
logon : Succeeded
account : ndmp_user

Policy Name : Diff Bakcup
Backup Selection : COMMON, D: (Partial)


Ex output of $hope2(which is killing me how to fix)



Client Name                   Policy Name                                     Policy Type Backup Selection
----------- ----------- ----------- ----------------
Name Windows
Name Windows
Name Windows
Name Windows
Name Windows
Name Ndmp
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Name e$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
ArchiveJob_Backup_to_Tape Namee$ (Partial), ...
Diff Bakcup - Name ,... COMMON, D: (Partial)
Name Backup BLR_Pro... /root_vdm/IN-BLR400-FS-C...


I have cleaned up my code and tried to put my command outputs into one variable and iterate through it in one go, which looks much nicer, but the output result in the same as above in my $hope2 output. It is leaving a big gap under two of the header "Policy Name" and "Backup Selection". Is there a way to use regex to remove those particular spaces only under those two columns in Powershell?



This is the new code I am running using



$agentserver = get-agentserver
$agentserver | convertto-csv | select-object -skip 2 | out-file t2.csv
$agentserver = import-csv t2.csv -Header server,id,type,accountstate,logonaccount
$budefinition = foreach($i in $a.name){
get-backupdefinition -agentserver $i}
$budefinition | convertto-csv | out-file t1.csv
$converted_budef = import-csv t1.csv | select agentserver,name,selectionsummary
$a = $agentserver + $converted_budef
$NewCSV = $a | ForEach-Object {
New-Object PSObject -Prop @{
'Client Name' = ($_."server" -Split '.(?!d)')[0]
'Policy Type' = $_."type"
'Backup State' = $_."BackupStatus"
'logon' = $_."LogonAccountTestStatus"
'account' = $_."LogonAccount"
'Policy Name' = ($_.Name -replace ","," ")
'Backup Selection' = ($_.selectionsummary -replace ","," ")
}
} | Select "Client Name","Policy Name","Policy Type","Backup Selection"
$NewCSV


Example of what I am trying to accomplish would look like this, that I can then use the export-csv and have a nice csv doc.



Client Name Policy Name Policy Type Backup Selection
----------- ----------- ----------- ----------------
NAME Diff Bakup Windows Common D
NAME Archive Ndmp /root_vdm/


After doing $NewCSV | fl I get a output of two separate list as shown below and I need them to all be in one. Any ideas how to fix it in my code above?



Client Name      : Name
Policy Name :
Policy Type : Ndmp
Backup Selection :

Client Name :
Policy Name : Diff Bakcup
Policy Type :
Backup Selection : COMMON D: (Partial)






powershell powershell-v2.0 powershell-v3.0






share|improve this question









New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 18 at 12:53





















New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 17 at 15:16









jim wood

173




173




New contributor




jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






jim wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
    – LotPings
    Nov 17 at 16:07










  • @LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
    – jim wood
    Nov 17 at 18:11










  • What do you get from $hope2 | fl ?
    – Walter Mitty
    Nov 17 at 21:01










  • @WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
    – jim wood
    Nov 18 at 4:08










  • @WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
    – jim wood
    Nov 18 at 12:48


















  • You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
    – LotPings
    Nov 17 at 16:07










  • @LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
    – jim wood
    Nov 17 at 18:11










  • What do you get from $hope2 | fl ?
    – Walter Mitty
    Nov 17 at 21:01










  • @WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
    – jim wood
    Nov 18 at 4:08










  • @WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
    – jim wood
    Nov 18 at 12:48
















You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
– LotPings
Nov 17 at 16:07




You shouild choose better variable names, $a=$AgentServers , $l=BackupDefinitions, $m a stripped down version of that, What properties shall defcsv get? Join arrays doesn't work the way you tried. I'd nest the iterations and build the desired final outcome in one go.
– LotPings
Nov 17 at 16:07












@LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
– jim wood
Nov 17 at 18:11




@LotPings Ok thank you, sorry if I use the wrong terminally, maybe combine is a better word, the result of $hope has all the data I want to export out to csv. I will try to nest the $defcsv code into the $NewCsv code and see how it turns out. The porperties of defcsv are getting the properties I need, 'Policy Name', and 'Backup Selection' (unless this is not what you mean by properties). Thanks again
– jim wood
Nov 17 at 18:11












What do you get from $hope2 | fl ?
– Walter Mitty
Nov 17 at 21:01




What do you get from $hope2 | fl ?
– Walter Mitty
Nov 17 at 21:01












@WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
– jim wood
Nov 18 at 4:08




@WalterMitty I am trying to get the final result to be in a nice format that I can do a export-csv and create a csv document.
– jim wood
Nov 18 at 4:08












@WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
– jim wood
Nov 18 at 12:48




@WalterMitty I ran my output through the | fl. I see what you mean, it looks to be two seperated list. one list has some entry's missing and the other this has those entry's but has the other two missing. I will post my an example above. Any idea how to correct it?
– jim wood
Nov 18 at 12:48

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






jim wood is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352549%2fcombining-two-commands-into-one-and-exporting-to-csv-file-in-powershell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








jim wood is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















jim wood is a new contributor. Be nice, and check out our Code of Conduct.













jim wood is a new contributor. Be nice, and check out our Code of Conduct.












jim wood is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352549%2fcombining-two-commands-into-one-and-exporting-to-csv-file-in-powershell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Paul Cézanne

UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

Angular material date-picker (MatDatepicker) auto completes the date on focus out