12345678910111213import-module webadministration$rows = ls IIS:\Sites |select Nameforeach ($row in $rows){ $site_name = $row.Name if (($site_name -ne "Default FTP Site") -and ($site_name -ne "Default Web Site") -and !($site_name -match "_ftp") ){ $webknight_path = Get-WebConfigurationProperty -filter //isapiFilters -PSPath "iis:\sites\$site_name" -name Collection[name="WebKnight"] |select path e..
12345678910111213141516Function Using-Culture ([System.Globalization.CultureInfo]$culture = (throw “USAGE: Using-Culture -Culture culture -Script {scriptblock}”),[ScriptBlock]$script= (throw “USAGE: Using-Culture -Culture culture -Script {scriptblock}”)){ $OldCulture = [System.Threading.Thread]::CurrentThread.CurrentCulture trap { [System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCul..
123456789101112131415161718$homeDir = C:\home $items = New-Object System.Collections.ArrayList$items.Add($homeDir) $dirs = Get-ChildItem -Path $homeDir -Recurse | ?{ $_.PSIsContainer } | Select-Object FullNameforeach ($dir in $dirs) { $items.Add($dir.FullName)} $files = Get-ChildItem -Path $homeDir -Recurse | Select-Object DirectoryName,Name | where { $_.DirectoryName -ne $NULL }foreach ($file i..
instsrv.exe, srvany.exe 설치instsrv.exe는 서비스를 등록/삭제 할 수있는 툴이고, 해당 툴을 이용하여, srvany.exe 를 서비스로 등록하면, 외부 어플리케이션을 서비스로 실행할 수 있게 해주다.두파일은 windows 2003 Resource Kit Tools 에서 제공하는 툴로 없는 경우 실행파일만 복사해줘도 된다.C:\windows\system32\instsrv.exeC:\windows\system32\srvany.exeinstsrv.exe는 파워쉘 명령어로 대체 가능서비스 등록instsrv.exe TestService "C:\windows\system32\srvany.exe"또는 파워쉘에서 New-Service -Name "TestService" -BinaryPathN..
12345678910Import-Module Webadministration foreach ($site in (Get-ChildItem -Path IIS:\Sites |Where-Object {$_.PhysicalPath -match 'www\\$'})) { write-host $site.Name foreach ($bindings in $site.Bindings.Collection) { foreach ($binding in $bindings) { write-host $binding.bindingInformation.Split(":")[2] } }}Colored by Color Scriptercs
# VM 생성New-VM -Name testvm -Path "C:\VM" # VM 프로세서 갯수 변경Set-VM -Name testvm -ProcessorCount 2 # VM 메모리 사이즈 변경Set-VMMemory testvm -StartupBytes 4GB # VM 익스포트 - 임포트(testvm 을 testvm2 로 Copy)Rename-VM testvm -NewName testvm2Export-VM -Name testvm2 -Path C:\VMRename-VM testvm2 -NewName testvmImport-VM -Path "C:\VM\testvm2\Virtual Machines\XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.vmcx" -Copy -GenerateNewI..
ftp_upload_example.ps112345678910111213141516171819202122$ftphost = "%(host)s"$ftpport = %(port)s$ftpusername= "%(user)s"$ftppassword = "%(passwd)s" $filename = [io.path]::GetFileName("%(file_full_path)s")[Net.ServicePointManager]::ServerCertificateValidationCallback ={$true}$ftpURL = "ftp://{0}:{1}/{2}" -f $ftphost, $ftpport, $filename$ftp = [System.Net.FtpWebRequest]::Create($ftpURL)$ftp = [Sy..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263$ScriptBlock = { param( [Parameter(Position=0, Mandatory=$false)][int]$threadNum=$(throw "threadNum param is not null"), [Parameter(Position=0, Mandatory=$false)][string]$targetServer=$(throw "targetServer param is not null"), [Parameter(Position=0, Mandatory=$false)][string]$comm..
- Total
- Today
- Yesterday
- 외부링크
- 예제
- limits
- monitoring
- engineering
- error
- configuration
- check
- client
- 코드
- code
- example
- RESTful
- apache
- Linux
- Python
- httpd
- 번역
- command
- mysql
- 명령어
- Module
- PowerShell
- Windows
- File
- Web
- deview
- MariaDB
- Ansible
- 이슈처리
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |