ardiardianto.blogspot.com
- Without Get-Content
- Dynamic call/execute command
$text = "texthere"$cmd = "Add-Content -Path C:\xxx.txt -Value ""$text"""for ($i = 0; $i -lt 1000; $i++) { Invoke-Expression $cmd }
$text = "texthere"
$cmd = "Add-Content -Path C:\xxx.txt -Value ""$text"""
for ($i = 0; $i -lt 1000; $i++) { Invoke-Expression $cmd }
No comments:
Post a Comment