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
| function Get-Uptime { | |
| <# | |
| .Synopsis | |
| gets the computers uptime in Days, Hours and Minutes | |
| .DESCRIPTION | |
| gets the computers uptime in Days, Hours and Minutes | |
| .EXAMPLE | |
| Get-Updtime -Computername <ComputerName> | |
| .EXAMPLE | |
| Get-Uptime #Gets the uptime of the local computer. |
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
| function Get-LoggedOnUser { | |
| <# | |
| .Synopsis | |
| Gets the logged in user of the station | |
| .DESCRIPTION | |
| Uses WMI to get the user who is logged in while stripping out the common SIDS | |
| .EXAMPLE | |
| Get-LoggedOnUser | |
| .EXAMPLE | |
| Get-LoggedOnUser -ComputerName Some-Computer |
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
| function Remove-Profile { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$false, Position=1)] | |
| #Default Param is the local computer. | |
| $Computer = $env:COMPUTERNAME, | |
| [Parameter(Mandatory=$True, Position=0)] | |
| [string]$Username | |
| ) |
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
| get-childitem -path "H:\" -Recurse -Force | Where{$_.Fullname.Length -gt 200} | select fullname | Out-GridView |
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
| function Get-VSSWriters { | |
| <# | |
| .Synopsis | |
| Performs VSSAdmin list writers | |
| .DESCRIPTION | |
| Gets the VSS Writers and outputs it as a object. | |
| .EXAMPLE | |
| Get-VSSWriters | |
| .NOTES | |
| Uses regex to get the information and then splits it into objects. |
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
| <# | |
| .Synopsis | |
| Function to get updates that are pending on a WSUS server. | |
| .DESCRIPTION | |
| Function looks at the NotInstalled, IntalledPendingReboot, Downloaded and Failed updates and returns them into a hash table. | |
| .EXAMPLE | |
| Get-PendingWindowsUpdates | |
| .EXAMPLE | |
| Get-PendingWindowsUpdates -ComputerName "Update-server" | |
| .INPUTS |
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
| function Create-ScriptEventLog | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [Parameter(Mandatory=$True, | |
| Position=1)] | |
| [string]$Source = "", | |
| [Parameter(Mandatory=$false, |
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
| #Add XAML code inbetween the two @ | |
| $inputXML = @" | |
| "@ | |
| $inputXML = $inputXML -replace 'mc:Ignorable="d"','' -replace "x:N",'N' -replace '^<Win.*', '<Window' | |
| [void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework') |
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
| #Add XAML code inbetween the two @ | |
| $inputXML = @" | |
| <Window x:Name="Sytem_Info" x:Class="SystemSpecs.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| Title="System Viewer v1" Height="466.667" Width="1149.561" WindowStyle="ToolWindow"> | |
| <Grid Margin="0,98,0,0"> | |
| <TabControl Margin="10,-51,10,10" Name="TabControl"> | |
| <TabItem Header="BIOS"> |
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
| function restart-clip | |
| { | |
| cmd /c echo.|clip | |
| } |
NewerOlder