![]() INFO: In order to customize the installation of CmdLet to your needs and set up necessary CSV file please read the following article How To Install And Configure PowerShell: CmdLets, Modules, Profiles ![]() INFO: To get a deeper explanation about client and solution input parameters please read these two sections Parameter client, Parameter solution. OKFINAllServers.txt – List of all servers for OK client and FIN solution.OKFINProdServers.txt – List of production environment servers for OK client and FIN solution.OKFINTestServers.txt – List of test environment servers for OK client and FIN solution. ![]() The naming convention for the filename parameter is as follows: Client Solution Text.txt. The text file should be located in … Documents\WindowsPowerShell\Modules\01servers folder. solution – it is a mandatory input parameter and by convention, I use two-three letters for solution shortcode (for example, FIN = Financial solution, HR = HR solution, etc.).This parameter value is part of the filename parameter naming convention. client – it is a mandatory input parameter and by convention, I use two letters for client shortcode (for example, OK = O client, BK = B client, etc.).The error log file is located in the PSLogs folder of Documents. errorlog – switch datatype and when turned on it will write errors into an external error log file using Write-ErrorLog CmdLet.The parameter belongs to the “FileName” parameter set. filename – it is the name of the text file with the list of servers and represents an alternative option to the “computers” parameter.The “ ServerNames” parameter set is the default parameter set. Parameter belongs to the “ServerNames” parameter set. computers – it is a list of servers passed as input parameter with default value ‘localhost’ and accepts both pipeline options.Test-ServerConnection CmdLet – Input Parameters INFO: If you want to know how to install and configure Efficiency Booster PowerShell Project files please read the following article: How To Install And Configure PowerShell: CmdLets, Modules, Profiles. Test-ServerConnection CmdLet is part of Common module and if you have downloaded the source code it can be found in the folder …\ Documents\WindowsPowerShell\Modules\03common Source code for Test-ServerConnection CmdLet can be downloaded from this zip file so please feel free to download it and it would be easier for you to follow me along. This project is the library of different CmdLets that can help us IT personal to do our everyday tasks more efficiently and accurately. ![]() Test-ServerConnection CmdLet pings the list of servers and this CmdLet belongs to Efficiency Booster PowerShell Project. $Object = New-Object PSObject -Property name" = $DNSCheck.Test-ServerConnection CmdLet resultset Test-ServerConnection CmdLet Explained $DNSCheck = (::GetHostByName(("$Server"))) $PingStatus = ($Ping.Send("$Server").Status) Additionally script will check if server exist and run ping connectivity test against: $FileBrowser.filter = "Txt (*.txt)| *.txt"īelow you can find file browser example where you have to select servers list in txt format. In this code I used filter parameter to determine which type of files do I want to search:Īdd-Type -AssemblyName For more information please visit technet site. The namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system. Its a nice feature where you can just select the server list instead of writing path inside the code. Today’s tip will be about file browser in PowerShell.
0 Comments
Leave a Reply. |