| Tee-Object -Variable 'group'
чтобы записать инфу в переменную $group и одновременно показать на экране а как имени файла указать кодировку? Если у меня могут быть как файлы на английском,так и на руссуом.
// set appropriate headers for attachment or streamed file
// The theoretically correct syntax for use of UTF-8 in Content-Disposition is very weird: filename*=UTF-8''foo%c3%a4 (yes, that's an asterisk, and no quotes except an empty single quote in the middle)
// This example is the same as the one above, but adding the "filename" parameter for compatibility with user agents not implementing RFC 5987:
// Content-Disposition: attachment;
// filename="EURO rates";
// filename*=utf-8''%e2%82%ac%20rates
// Note: Those user agents that do not support the RFC 5987 encoding ignore “filename*” when it occurs after “filename”.
// http://tools.ietf.org/html/rfc6266#section-5
//
header('Content-Disposition: attachment; filename="'.rawurlencode($file_name).'"; filename*=utf-8\'\''.rawurlencode($file_name));
get-help Block-SmbShareAccess -examples
Block-SmbShareAccess -Name VMFiles -AccountName Contoso\Guest
У вас же, судя по ошибке, в имени шары идёт полный путь, а не только имя. Имя у вас будет V$, откуда берётся \\FILESERVER\ вам виднее.PS> Get-Command -Module PrintManagement
Add-Printer
Add-PrinterDriver
Add-PrinterPort
Get-PrintConfiguration
Get-Printer
Get-PrinterDriver
Get-PrinterPort
Get-PrinterProperty
Get-PrintJob
Read-PrinterNfcTag
Remove-Printer
Remove-PrinterDriver
Remove-PrinterPort
Remove-PrintJob
Rename-Printer
Restart-PrintJob
Resume-PrintJob
Set-PrintConfiguration
Set-Printer
Set-PrinterProperty
Suspend-PrintJob
Write-PrinterNfcTag
[enum]::GetValues([Microsoft.Office.Interop.Word.WdViewType])
Name Value
---- -----
wdNormalView 1
wdOutlineView 2
wdPrintView 3
wdPrintPreview 4
wdMasterView 5
wdWebView 6
wdReadingView 7
wdConflictView 8
# и если обойтись без кавычек, PSReadline ещё и подсказки даст по ctrl+space после ::
[Microsoft.Office.Interop.Word.WdViewType]::wdWebView
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'}
(Get-Process -PID $PID).SessionId
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'} | select si,sessionid
$si = (Get-Process -PID $PID).SessionId; Get-Process | Where-Object {($_.SI -eq $si) -and ($_.ProcessName -eq '1cv8')}
/ip dhcp-server lease add address=1.2.3.4 mac-address=112233445566
-split '(<desc>.*?</desc>)'
и потом в цикле чистить.Get-Service openvpn | Set-Service -StartupType Automatic