I have a problem in a script where i need to select a string and put it into a file.
I need to use the "Get-Website" cmmdlet in powershell to pull the ID
right now i am using Get-Website *sitename |fl ID
now the output comes along like "id : 15"
i need to drop this down to sjust the ID number and use it elsewhere in the script to then inject it into a .txt file so that a perl script can come along and use it for stats
Cheers
Try this: