Posts

Compare-Object does not work properly

good day all, i trying find change in personnel list monthly. personnel data being saved csv files on first , last day of month. after trying find difference between 2 csv file below cmdlet; $a = import-csv c:\old_prs.csv $b = import-csv c:\new_prs.csv $result1 = compare-object $a $b -property logonname -passthru |select "name;logonname;mail;department" | export-csv c:\result.csv -notypeinformation note: if use "select inputobject" instead of " select "name;logonname;mail;department" " , program write "inputobject" cell a1 of "result.csv" file, nothing else.  both csv files has same columns "name;logonname;mail;department" old_prs.csv below; name logonname mail department name1 logonname1 mail1 dp1 name2 logonname2 mail2 dp2 name3 logonname3 mail3 dp3 name4 logonname4 mail4 dp4 name5 logonname5 mail5 dp5 ...

Array Formatting to string

Image
i looking create switch statement dynamically populates options 1 & 2: when i'm outputing elements array i'm not getting expected results. want display file03-ny & file03-ny. know why happeneing , how fix it? import-module failoverclusters $clusternodes = @() $colitems = get-clusternode | select-object name -expandproperty name foreach($node in $colitems) { #write-host $node -foregroundcolor "yellow" $nodename = $node $clusternode = new-object -typename psobject -property @{ node = $nodename } $clusternodes += $clusternode } #select cluster node write-host "choose cluster node." write-host "1." $clusternodes[0] write-host "2." $clusternodes[1] { $a = read-host "select option..." } until ($a -match "1|2") write-host " " switch ($a) { 1 { write-host "migrate resources to: $clusternodes[0]" } 2 { ...

Mapping network drive works in DOS prompt but fails in PowerShell

i'm stuck on one.  need map local drive letter windows share on remote machine , must pass credentials access it.  i'm doing this: net use "f:" "\\servername\share" mypassword /user: mydomain \ my.dotted.user.name all stuff in italics showing real info goes. so works when in dos prompt window.  can view mapped drive entering "net use".  can view mapped drive in powershell "net use".  can delete mapped drive in powershell "net use "f:" /delete". however, when run command map drive in powershell "system error 86 has occurred" , "the specified network password not correct".  know domain, user name, , password correct.  have reset password several times.  have verified there isn't time synchronization issue between machine , remote server. why mapping drive failing in powershell??  grateful suggestions. thanks. stephanie if password contains symbol ...

ApplicationData Kepts Repeating Help !!!

i noticed have large repeating applicationdata folder how stop on windows 2008 r2 c:\progra~3\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\applic~1\application data any ideas fix this some of app storing specific data ( sequenced apps - appv packages ) . validate source of application. Windows Server  >  Windows Server General Forum

CA Clusters

with windows server 2012 or 2012 r2, possible create ca cluster @ main location 2 nodes (active/passive) , place third node @ remote location site failover?  seem recall 2 nodes allowed in ca cluster cannot find information documented anywhere. thanks i checked again , looks like, microsoft supports multi-node configuration clustering 1 active , n passive nodes. here excerpt adcs clustering guide: a failover cluster of size can used provide high availability environment certificate services adcs not require specific hardware requirements, adcs hardware requirements same windows server 2012 general installation. my weblog: en-us.sysadmins.lv powershell pki module: pspki.codeplex.com powershell cmdlet editor pscmdlethelpeditor.codeplex.com check out new: ssl certificate verifier check out new: powershell fciv tool. Windows Server ...

Create a Java Script to RUN on a Remote Computer.

Image
i want create script use run powershell on network pcs. must point computername , the path java application stored can server path. if possible must allow me run script in bulk (meaning running more 2 pcs simultaneously) on networked pcs. have tried not working. script must run silently without users on network see , want not ask admin credentials runs. don't know how put addmin on script @ once users pc not prompt it. #variables $computername = get-content c:\psdeploy\list.txt $sourcefile = "\\server\folder\list\java\jre-8u91-windows-i586.exe" #this section install software foreach ( $computer in $computername ) { $destinationfolder = "\\ $computer \c:\program files (x86)" #this section copy $sourcefile $destinationfolder. if folder not exist create it. if ( ! ( test-path -path $destinationfolder )) { new-item $destination...

IIS kicks all session randomly

hi, using windows 2003 sp2 .net 2. once week iis kicked out users without giving information in log or raising event. driving me crazy, idea causing this? advise appreciated. hi,   as issue related iis, suggest discussing in our iis forum. best resource troubleshoot issue.   http://forums.iis.net/   i hope issue can resolved soon.   tim quan - msft Windows Server  >  Windows Server General Forum