This file contains hidden or 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 is a PowerShell comment. | |
function MyFunction([Parameter(Position = 0)][System.String]$path) | |
{ | |
:loopLabel foreach ($thisFile in (Get-ChildItem $path)) | |
{ | |
Write-Host ; Write-Host -Fore Yellow ` | |
('Length:' + | |
[System.Math]::Floor($thisFile.Length / 1000)) | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<Configuration> | |
<ViewDefinitions> | |
<View> | |
<Name>myobject</Name> | |
<ViewSelectedBy> | |
<TypeName>myobject</TypeName> | |
</ViewSelectedBy> | |
<TableControl> | |
<TableHeaders> |
This file contains hidden or 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
$acl = Get-Acl -Path C:\SpecialFolder\SpecialFile.txt | |
$user = 'BillB' | |
$rights = [System.Security.AccessControl.FileSystemRights]'ReadAndExecute, Write, Modify, Read' # enum flags | |
$rights | |
Modify | |
$RuleBillB = [System.Security.AccessControl.FileSystemAccessRule]::new($user, $rights, 'Allow') | |
$RuleBillB |