-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Amirhossein
authored and
Amirhossein
committed
Dec 26, 2023
1 parent
a8d698a
commit 355644c
Showing
3 changed files
with
42 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function Connect-BsnIPTablesCli { | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory = $true, HelpMessage = 'Please enter the target server address')] | ||
[string]$ServerAddress | ||
) | ||
|
||
process { | ||
Write-Output "Connected To: $ServerAddress" | ||
# Perform other actions related to IPTables or any other tasks here | ||
} | ||
|
||
end { | ||
# You can add cleanup or finalization steps here if needed | ||
} | ||
} | ||
|
||
# Prompt the user to enter the server address outside the function | ||
$enteredServerAddress = Read-Host "Enter the target server address" | ||
|
||
# Call the function with the entered server address | ||
Connect-BsnIPTablesCli -ServerAddress $enteredServerAddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters