diff --git a/ComputerManagement/ComputerManagement-help.xml b/ComputerManagement/ComputerManagement-help.xml new file mode 100644 index 0000000..0040a17 --- /dev/null +++ b/ComputerManagement/ComputerManagement-help.xml @@ -0,0 +1,2199 @@ + + + + + Backup-EventLog + Backup + EventLog + + Backup Eventlogs from remote computer + + + + This function copies event log files from a remote computer to a backup location. + + + + Backup-EventLog + + ComputerName + + The NetBIOS name of the computer to connect to. + + System.String + + System.String + + + None + + + LogPath + + The path to the logs you wish to backup. The default logpath "C:\Windows\system32\winevt\Logs" is used if left blank. + + System.String + + System.String + + + C:\Windows\system32\winevt\Logs + + + BackupPath + + The location to copy the logs to. + + System.String + + System.String + + + C:\Logs + + + + + + BackupPath + + The location to copy the logs to. + + System.String + + System.String + + + C:\Logs + + + ComputerName + + The NetBIOS name of the computer to connect to. + + System.String + + System.String + + + None + + + LogPath + + The path to the logs you wish to backup. The default logpath "C:\Windows\system32\winevt\Logs" is used if left blank. + + System.String + + System.String + + + C:\Windows\system32\winevt\Logs + + + + + + + May need to be a user with rights to access various logs, such as security on remote computer. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Backup-EventLogs -ComputerName dc1 + + + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Backup-EventLog.md#backup-eventlog + + + + + + Connect-Rdp + Connect + Rdp + + Connect to one or more computers over RDP + + + + To securely cache login credentials, you can use the command line utility cmdkey.exe. With this utility, you can save a username and a password for a given remote connection. Windows will then securely cache the information and automatically use it when needed. + + + + Connect-Rdp + + ComputerName + + The hostname or IP address of the computer to connect to + + System.Object + + System.Object + + + None + + + Credential + + A credential object that contains a valid username and password for the remote computer + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + ComputerName + + The hostname or IP address of the computer to connect to + + System.Object + + System.Object + + + None + + + Credential + + A credential object that contains a valid username and password for the remote computer + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + + FunctionName : Connect-RDP Created by : jspatton Date Coded : 06/23/2014 08:48:25 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Connect-Rdp -ComputerName Server-01 -Credential Company.com\Administrator + + The basic syntax showing a connection to a single machine + + + + -------------------------- EXAMPLE 2 -------------------------- + Connect-Rdp -ComputerName Server-01, 192.168.1.2, server-03.company.com -Credential COMPANY\Administrator + + This example shows connecting to multiple servers at once. + + + + -------------------------- EXAMPLE 3 -------------------------- + "server-04","server-06" |Connect-Rdp -Credential $Credentials + + This example shows passing the computernames over the pipe + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Connect-Rdp.md#connect-rdp + + + Automatic Remote Desktop onnection + http://www.powershellmagazine.com/2014/04/18/automatic-remote-desktop-connection/ + + + + + + Export-EventLog + Export + EventLog + + Export an Eventlog from a local or remote computer + + + + This function will export the logname you specify to the folder and filename that you provide. The exported file is in the native format for Event logs. + This function leverages the System.Diagnostics.Eventing.Reader class to export the log of the local or remote computer. + + + + Export-EventLog + + ComputerName + + Type the NetBIOS name, an Internet Protocol (IP) address, or the fully qualified domain name of the computer. The default value is the local computer. + This parameter accepts only one computer name at a time. To find event logs or events on multiple computers, use a ForEach statement. + To get events and event logs from remote computers, the firewall port for the event log service must be configured to allow remote access. + + System.Object + + System.Object + + + None + + + Credential + + Specifies a user account that has permission to perform this action. The default value is the current user. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + LogName + + Export messages from the specified LogName + + System.Object + + System.Object + + + None + + + Destination + + The full path and filename to where the log should be exported to. + + System.Object + + System.Object + + + None + + + ListLog + + If present the function will list all the logs currently available on the computer. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + ComputerName + + Type the NetBIOS name, an Internet Protocol (IP) address, or the fully qualified domain name of the computer. The default value is the local computer. + This parameter accepts only one computer name at a time. To find event logs or events on multiple computers, use a ForEach statement. + To get events and event logs from remote computers, the firewall port for the event log service must be configured to allow remote access. + + System.Object + + System.Object + + + None + + + Credential + + Specifies a user account that has permission to perform this action. The default value is the current user. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + Destination + + The full path and filename to where the log should be exported to. + + System.Object + + System.Object + + + None + + + ListLog + + If present the function will list all the logs currently available on the computer. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + LogName + + Export messages from the specified LogName + + System.Object + + System.Object + + + None + + + + + + + FunctionName : Export-EventLogs Created by : jspatton Date Coded : 04/30/2012 12:36:12 + The folder and filename that you specify will be created on the remote machine. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Export-EventLogs -ComputerName sql -Credential (Get-Credential) -LogName Application -Destination 'C:\LogFiles1\Application.evtx' + + This example shows how to export the Application log from a computer named SQL and save the file as Application.evtx in a folder called LogFiles. This also shows how to use the Get-Credential cmdlet to pass credentials into the function. + + + + -------------------------- EXAMPLE 2 -------------------------- + Export-EventLog -ListLog +Application +HardwareEvents +Internet Explorer +Key Management Service +Media Center + + This example shows how to list the lognames on the local computer + + + + -------------------------- EXAMPLE 3 -------------------------- + Export-EventLog -LogName Application -Destination C:\Logs\App.evtxExport-EventLog -LogName Application -Destination C:\Logs\App.evtx + + This example shows how to export the Application log on the local computer to a folder on the local computer. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Export-EventLog.md#export-eventlog + + + + + + Get-DiskUsage + Get + DiskUsage + + Get the disk usage of a given path + + + + This function returns the disk usage of a given path + + + + Get-DiskUsage + + Path + + The path to check + + System.String + + System.String + + + . + + + + + + Path + + The path to check + + System.String + + System.String + + + . + + + + + + + FunctionName : Get-DiskUsage Created by : jspatton Date Coded : 03/21/2012 10:29:24 + If you don't have access to read the contents of a given folder the function returns 0. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-DiskUsage -Dir c:\ + +FolderName FolderSize +---------- ---------- +C:\dcam 204 +C:\DPMLogs 1166251 +C:\inetpub 0 +C:\PerfLogs 0 +C:\Program Files 504195070 +C:\Program Files (x86) 2747425666 +C:\repository 10294506 +C:\SCRATCH 0 +C:\scripts 2218148 +C:\TEMP 0 +C:\Trail 0 +C:\Users 16198918163 +C:\Windows 18163280116 + + This shows the basic syntax of the command + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-DiskUsage -Dir c:\ |Sort-Object -Property FolderSize + +FolderName FolderSize +---------- ---------- +C:\SCRATCH 0 +C:\Trail 0 +C:\TEMP 0 +C:\PerfLogs 0 +C:\inetpub 0 +C:\dcam 204 +C:\DPMLogs 1166251 +C:\scripts 2218148 +C:\repository 10294506 +C:\Program Files 504195070 +C:\Program Files (x86) 2747425666 +C:\Users 16198918163 +C:\Windows 18163345365 + + This example shows piping the output through Sort-Object + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-DiskUsage.md#get-diskusage + + + + + + Get-InvalidLogonAttempt + Get + InvalidLogonAttempt + + Return a list of invalid logon attempts. + + + + This function queries the security log of a given computer and retrieves Event ID 4625, failed logon attempt. + + + + Get-InvalidLogonAttempt + + ComputerName + + The name of the computer to pull logs from + + System.Object + + System.Object + + + None + + + LogName + + The name of the Event Log. + You will notice that I have set the LogName to Security, since this particular script was designed to find a specific entry. This can be modified to suit your needs. + + System.Object + + System.Object + + + Security + + + EventID + + The Event ID to return. + You will notice that I have set the EventID to 4625, since this particular script was designed to find those particular entries. This can be modified to suit your needs. + + System.Object + + System.Object + + + 4625 + + + + + + ComputerName + + The name of the computer to pull logs from + + System.Object + + System.Object + + + None + + + EventID + + The Event ID to return. + You will notice that I have set the EventID to 4625, since this particular script was designed to find those particular entries. This can be modified to suit your needs. + + System.Object + + System.Object + + + 4625 + + + LogName + + The name of the Event Log. + You will notice that I have set the LogName to Security, since this particular script was designed to find a specific entry. This can be modified to suit your needs. + + System.Object + + System.Object + + + Security + + + + + + + ScriptName : Get-InvalidLogonAttempts Created By : jspatton Date Coded : 10/26/2011 11:20:58 ScriptName is used to register events for this script LogName is used to determine which classic log to write to + ErrorCodes 100 = Success 101 = Error 102 = Warning 104 = Information + If you adjust the script to look for event id's other than 4625, you will want to examine the Event Properties. This is similar to viewing the "Friendly" view of an event in the event log. Below are all the properties for Event ID 4625. + 00 SubjectUserSid S-1-5-18 01 SubjectUserName NODE1$ 02 SubjectDomainName SOECS 03 SubjectLogonId 0x3e7 04 TargetUserSid S-1-0-0 05 TargetUserName Daniel 06 TargetDomainName NODE1 07 Status 0xc000006d 08 FailureReason %%2313 09 SubStatus 0xc0000064 10 LogonType 10 11 LogonProcessName User32 12 AuthenticationPackageName Negotiate 13 WorkstationName NODE1 14 TransmittedServices - 15 LmPackageName - 16 KeyLength 0 17 ProcessId 0x3278 18 ProcessName C:\Windows\System32\winlogon.exe 19 IpAddress ##.###.###.### 20 IpPort 51144 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-InvalidLogonAttempts -ComputerName Desktop-pc1 -LogName 'Security' -EventID 4625 + +Message MachineName TimeCreated IpAddress LogonType TargetUserName IpPort +------- ----------- ----------- --------- --------- -------------- ------ +An account ... Desktop-pc1... 10/26/2011... ##.###.###... 10 Daniel 62581 +An account ... Desktop-pc1... 10/26/2011... ##.###.###... 10 Daniel 11369 +An account ... Desktop-pc1... 10/26/2011... ##.###.###... 10 Daniel 47575 +An account ... Desktop-pc1... 10/26/2011... ##.###.###... 10 Daniel 51144 + + This is the basic syntax of the command, the output is returned to stdin. + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-InvalidLogonAttempts |Export-Csv -Path .\InvalidLoginAttempts.csv + + This example shows redirecting the output through the Export-CSV command to get a csv file. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-InvalidLogonAttempt.md#get-invalidlogonattempt + + + + + + Get-MappedDrive + Get + MappedDrive + + Return a list of mapped network drives on the computer + + + + This function returns a list of mapped network drives from the local or remote computer. + + + + Get-MappedDrive + + ComputerName + + The name of the computer to get the list from. + + System.String + + System.String + + + (hostname) + + + Credentials + + A credentials object to pass if needed. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + ComputerName + + The name of the computer to get the list from. + + System.String + + System.String + + + (hostname) + + + Credentials + + A credentials object to pass if needed. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + + FunctionName : Get-MappedDrives Created by : jspatton Date Coded : 03/20/2012 16:03:52 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-MappedDrives + +Caption : V: +FreeSpace : 4129467170816 +Name : V: +ProviderName : \\\\users2.company.com\homedir4\jspatton +Size : 10737418240 +VolumeName : 236 + + This is the basic syntax of the command. + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-MappedDrives -ComputerName Desktop-PC01 + +Caption : U: +FreeSpace : 134377222144 +Name : U: +ProviderName : \\\\people.company.com\i\jspatton +Size : 687194767360 +VolumeName : IGroup + + This syntax shows passing the optional ComputerName parameter. If this is not the local computer and you didn't pass the Credentials object, you will be prompted. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-MappedDrive.md#get-mappeddrive + + + + + + Get-NetShare + Get + NetShare + + Return a list of shares without using WMI + + + + This function returns a list of shares using the old net view command. This works well in situations where a fierwall may be blocking access. + + + + Get-NetShare + + ComputerName + + The name of the server that has file or print shares + + System.String + + System.String + + + None + + + Type + + This will be either Print or Disk Print returns printer shares Disk returns file shares + + System.String + + System.String + + + None + + + + + + ComputerName + + The name of the server that has file or print shares + + System.String + + System.String + + + None + + + Type + + This will be either Print or Disk Print returns printer shares Disk returns file shares + + System.String + + System.String + + + None + + + + + + + FunctionName : Get-NetShares Created by : jspatton Date Coded : 10/08/2014 11:08:30 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-NetShare -ComputerName server-01 -Type Print + +Server Share Path +------ ----- ---- +server-01 hp01 \\\\server-01\hp01 +server-01 hp02 \\\\server-01\hp02 +server-01 hp03 \\\\server-01\hp03 + + This example shows the basic usage for this function + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-NetShare.md#get-netshare + + + + + + Get-NonStandardServiceAccount + Get + NonStandardServiceAccount + + Return a list of services using Non-Standard accounts. + + + + This function returns a list of services from local or remote coputers that have non-standard user accounts for logon credentials. + + + + Get-NonStandardServiceAccount + + Computer + + The NetBIOS name of the computer to pull services from. + + System.String + + System.String + + + (& hostname) + + + Credentials + + The DOMAIN\USERNAME of an account with permissions to access services. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + Filter + + This is a pipe (|) seperated list of accounts to filter out of the returned services list. + + System.String + + System.String + + + Localsystem|NT Authority\LocalService|NT Authority\NetworkService + + + + + + Computer + + The NetBIOS name of the computer to pull services from. + + System.String + + System.String + + + (& hostname) + + + Credentials + + The DOMAIN\USERNAME of an account with permissions to access services. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + Filter + + This is a pipe (|) seperated list of accounts to filter out of the returned services list. + + System.String + + System.String + + + Localsystem|NT Authority\LocalService|NT Authority\NetworkService + + + + + + + Powershell may need to be run elevated to run this script. UAC may need to be disabled to run this script. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-NonStandardServiceAccounts + +StartName Name DisplayName +--------- ---- ----------- +.\Jeff Patton MyService My Test Service + + This example shows no parameters provided + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-NonStandardServiceAccounts -Computer dpm -Credentials $Credentials + +StartName Name DisplayName +--------- ---- ----------- +.\MICROSOFT$DPM$Acct MSSQL$MS$DPM2007$ SQL Server (MS$DPM2007$) +.\MICROSOFT$DPM$Acct MSSQL$MSDPM2010 SQL Server (MSDPM2010) +NT AUTHORITY\NETWORK SERVICE MSSQLServerADHelper100 SQL Active Directory Helper S... +NT AUTHORITY\NETWORK SERVICE ReportServer$MSDPM2010 SQL Server Reporting Services... +.\MICROSOFT$DPM$Acct SQLAgent$MS$DPM2007$ SQL Server Agent (MS$DPM2007$) +.\MICROSOFT$DPM$Acct SQLAgent$MSDPM2010 SQL Server Agent (MSDPM2010) + + This example shows all parameters in use + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-NonStandardServiceAccounts -Computer dpm -Credentials $Credentials ` +-Filter "localsystem|NT Authority\LocalService|NT Authority\NetworkService|NT AUTHORITY\NETWORK SERVICE" + +StartName Name DisplayName +--------- ---- ----------- +.\MICROSOFT$DPM$Acct MSSQL$MS$DPM2007$ SQL Server (MS$DPM2007$) +.\MICROSOFT$DPM$Acct MSSQL$MSDPM2010 SQL Server (MSDPM2010) +.\MICROSOFT$DPM$Acct SQLAgent$MS$DPM2007$ SQL Server Agent (MS$DPM2007$) +.\MICROSOFT$DPM$Acct SQLAgent$MSDPM2010 SQL Server Agent (MSDPM2010) + + This example uses the Filter parameter to filter out NT AUTHORITY\NETWORK SERVICE account from the preceeding example. + The back-tick (`) was used for readability purposes only. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-NonStandardServiceAccount.md#get-nonstandardserviceaccount + + + + + + Get-OpenFile + Get + OpenFile + + Get a list of files open on the server + + + + This function returns a list of files open on a given server. The output is similar to that of the Manage Open Files from the Share and Storage Management console. + + + + Get-OpenFile + + ComputerName + + The NetBIOS or FQDN of the computer + + System.Object + + System.Object + + + (hostname) + + + + + + ComputerName + + The NetBIOS or FQDN of the computer + + System.Object + + System.Object + + + (hostname) + + + + + + + FunctionName : Get-OpenFiles Created by : Jeff Patton Date Coded : 09/26/2011 13:01:38 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-OpenFiles -ComputerName fs + +User Path LockCount +---- ---- --------- +User1 F:\Users\User1\Documents\Data\... 0 +User2 P:\Public 0 + + This example shows the basic usage of this command. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-OpenFile.md#get-openfile + + + + + + Get-OpenSession + Get + OpenSession + + Return a list of open sessions + + + + This function returns a list of open session on a given server. The output is similar to that of the Manage Open Sessions dialog in the Share and Storage Management console. + + + + Get-OpenSession + + ComputerName + + This is the FQDN or NetBIOS name of the computer + + System.Object + + System.Object + + + (hostname) + + + + + + ComputerName + + This is the FQDN or NetBIOS name of the computer + + System.Object + + System.Object + + + (hostname) + + + + + + + FunctionName : Get-OpenSessions Created by : Jeff Patton Date Coded : 09/26/2011 11:35:40 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-OpenSessions -ComputerName fs + +User Computer ConnectTime IdleTime +---- -------- ----------- -------- +user1 10.10.1.62 1615 1 +user2 10.10.1.156 7529 17 + + This example shows the basic usage of the command. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-OpenSession.md#get-opensession + + + + + + Get-PendingUpdate + Get + PendingUpdate + + Retrieves the updates waiting to be installed from WSUS + + + + Retrieves the updates that are available to install on the local system + + + + Get-PendingUpdate + + ComputerName + + Computer or computers to find updates for. + + System.String + + System.String + + + None + + + + + + ComputerName + + Computer or computers to find updates for. + + System.String + + System.String + + + None + + + + + + + Author: Boe Prox Date Created: 05Mar2011 RPC Dynamic Ports need to be enabled on inbound remote servers. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PendingUpdates + + + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-PendingUpdate.md#get-pendingupdate + + + + + + Get-PrinterLog + Get + PrinterLog + + Get a log of all printing from a given server. + + + + This function will return a log of all the printing that has occurred on a given print server. + + + + Get-PrinterLog + + LogName + + The default log for printing on Windows Server 2008 R2 is specified. + + System.Object + + System.Object + + + Microsoft-Windows-PrintService/Operational + + + ComputerName + + The name of your print server. + + System.Object + + System.Object + + + None + + + + + + ComputerName + + The name of your print server. + + System.Object + + System.Object + + + None + + + LogName + + The default log for printing on Windows Server 2008 R2 is specified. + + System.Object + + System.Object + + + Microsoft-Windows-PrintService/Operational + + + + + + + The following log will need to be enabled before logs can be generated by the server: "Microsoft-Windows-PrintService/Operational" + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PrinterLogs -ComputerName ps + +Size : 96060 +Time : 8/16/2011 5:01:09 PM +User : MyAccount +Job : 62 +Client : \\\\10.133.5.143 +Port : Desktop-PC01.company.com +Printer : HP-Laser +Pages : 1 +Document : Microsoft Office Outlook - Memo Style + + This example shows the basic usage of the command. + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PrinterLogs -ComputerName ps |Export-Csv -Path .\PrintLogs.csv + + This is the syntax that I would see being used the most. + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-PrinterLog.md#get-printerlog + + + + + + Get-RDPLoginEvent + Get + RDPLoginEvent + + Return Remote Desktop login attempts + + + + This function returns login attempts from the Microsoft Windows TerminalServices RemoteConnectionManager log. The specific events are logged as EventID 1149, and they are logged whether or not the user actually gets to the desktop. + + + + Get-RDPLoginEvent + + ComputerName + + This is the NetBIOS name of the computer to pull events from. + + System.Object + + System.Object + + + None + + + Credentials + + A user account with the ability to retreive these events. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + ComputerName + + This is the NetBIOS name of the computer to pull events from. + + System.Object + + System.Object + + + None + + + Credentials + + A user account with the ability to retreive these events. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + + + + System.Object + + + + + + + + + + System.Object[] + + + + + + + + + The Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational needs to be enabled The user account supplied in $Credentials needs to have permission to view this log No output is returned if the log is empty. + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-RDPLoginEvents -Credentials $Credentials -ComputerName MyPC |Format-Table + +SourceNetworkAddress Domain TimeCreated User +-------------------- ------ ----------- ---- +192.168.1.1 MyPC... 4/30/2011 8:20:02 AM Administrator... +192.168.1.1 MyPC... 4/28/2011 4:53:01 PM Administrator... +192.168.1.1 MyPC... 4/21/2011 2:01:42 PM Administrator... +192.168.1.1 MyPC... 4/19/2011 11:42:59 AM Administrator... +192.168.1.1 MyPC... 4/19/2011 10:30:52 AM Administrator... + + This example shows piping the output to Format-Table + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-RDPLoginEvent.md#Get-rdploginevent + + + + + + Get-ServiceTag + Get + ServiceTag + + Get the serial number (Dell ServiceTag) from Win32_BIOS + + + + An example showing the only parameter. + + + + Get-ServiceTag + + ComputerName + + The NetBIOS name of the computer. + + System.Object + + System.Object + + + (& hostname) + + + + + + ComputerName + + The NetBIOS name of the computer. + + System.Object + + System.Object + + + (& hostname) + + + + + + + This space intentionally left blank. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-ServiceTag -ComputerName Desktop-01 + +SerialNumber +------------ +1AB2CD3 + + + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-ServiceTag.md#get-servicetag + + + + + + Get-WinEventTail + Get + WinEventTail + + A tail cmdlet for Eventlogs + + + + This function will allow you to tail Windows Event Logs. You specify a Logname for either the original logs, Application, System and Security or the new format for the newer logs Microsoft-Windows-PowerShell/Operational + + + + Get-WinEventTail + + LogName + + Specify a valid Windows Eventlog name + + System.String + + System.String + + + System + + + ShowExisting + + An integer to show the number of events to start with, the default is 10 + + System.Int32 + + System.Int32 + + + 10 + + + + + + LogName + + Specify a valid Windows Eventlog name + + System.String + + System.String + + + System + + + ShowExisting + + An integer to show the number of events to start with, the default is 10 + + System.Int32 + + System.Int32 + + + 10 + + + + + + + FunctionName : Get-WinEventTail Created by : jspatton Date Coded : 10/09/2014 13:20:22 + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-WinEventTail -LogName Application + +ProviderName: ESENT + +TimeCreated Id LevelDisplayName Message +----------- -- ---------------- ------- +10/9/2014 11:55:51 AM 102 Information svchost (7528) Instance: ... +10/9/2014 11:55:51 AM 105 Information svchost (7528) Instance: ... +10/9/2014 11:55:51 AM 326 Information svchost (7528) Instance: ... +10/9/2014 12:05:49 PM 327 Information svchost (7528) Instance: ... +10/9/2014 12:05:49 PM 103 Information svchost (7528) Instance: ... + + + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-WinEventTail.md#get-wineventtail + + + StackOverflow Question + http://stackoverflow.com/questions/15262196/powershell-tail-windows-event-log-is-it-possible + + + + + + Grant-RegistryPermission + Grant + RegistryPermission + + Grant permissions on registry paths + + + + This function allows you to set permissions on registry paths on a computer. Using the parameters you can specify the rights, inheritance and propagation of the rights. + + + + Grant-RegistryPermission + + Path + + A registry path + + System.String + + System.String + + + None + + + Principal + + Username in DOMAIN\User format + + System.String + + System.String + + + None + + + Rights + + Specifies the access control rights that can be applied to registry objects. See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights(v=vs.110).aspx + + + QueryValues + SetValue + CreateSubKey + EnumerateSubKeys + Notify + CreateLink + Delete + ReadPermissions + WriteKey + ExecuteKey + ReadKey + ChangePermissions + TakeOwnership + FullControl + + System.Security.AccessControl.RegistryRights + + System.Security.AccessControl.RegistryRights + + + None + + + Inheritance + + Inheritance flags specify the semantics of inheritance for access control entries (ACEs). See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags(v=vs.110).aspx + + + None + ContainerInherit + ObjectInherit + + System.Security.AccessControl.InheritanceFlags + + System.Security.AccessControl.InheritanceFlags + + + None + + + Propagation + + Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are significant only if inheritance flags are present. See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags(v=vs.110).aspx + + + None + NoPropagateInherit + InheritOnly + + System.Security.AccessControl.PropagationFlags + + System.Security.AccessControl.PropagationFlags + + + None + + + + + + Inheritance + + Inheritance flags specify the semantics of inheritance for access control entries (ACEs). See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags(v=vs.110).aspx + + System.Security.AccessControl.InheritanceFlags + + System.Security.AccessControl.InheritanceFlags + + + None + + + Path + + A registry path + + System.String + + System.String + + + None + + + Principal + + Username in DOMAIN\User format + + System.String + + System.String + + + None + + + Propagation + + Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are significant only if inheritance flags are present. See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags(v=vs.110).aspx + + System.Security.AccessControl.PropagationFlags + + System.Security.AccessControl.PropagationFlags + + + None + + + Rights + + Specifies the access control rights that can be applied to registry objects. See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights(v=vs.110).aspx + + System.Security.AccessControl.RegistryRights + + System.Security.AccessControl.RegistryRights + + + None + + + + + + + FunctionName : Grant-RegistryPermission Created by : jspatton Date Coded : 01/12/2015 14:53:41 + I lifted this almost completely from iheartpowershell's blog, this appears to be the first iteration of this function, I have since found it copied verbatim onto other blogs, so I feel the need to give credit where credit is due. + I modified this function to build the identity from a username, and pass in the identityrefernce object to the rule. + + + + + -------------------------- EXAMPLE 1 -------------------------- + Grant-RegistryPermission -Path HKCU:\Environment\ -Principal DOMAIN\User01 -Rights FullControl + +Path Owner Access +---- ----- ------ +Microsoft.PowerShell.Core\Registry::... +NT AUTHORITY\SYSTEM NT AUTHORITY\RESTRICTED Allow ReadK... + + This example grants full control to the environment key for user01 + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/Grant-RegistryPermission.md#grant-registrypermission + + + Grant Registry Permissions + http://www.iheartpowershell.com/2011/09/grant-registry-permissions.html + + + MSDN RegistryAccessRule + http://msdn.microsoft.com/en-us/library/ms147899(v=vs.110).aspx + + + MSDN RegistryRights + http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights(v=vs.110).aspx + + + MSDN ACL Inheritance + http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags(v=vs.110).aspx + + + MSDN ACL Propagation + http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags(v=vs.110).aspx + + + + + + New-Credential + New + Credential + + Create a Credential Object + + + + This function creates a new Credential Object for use in Scripts or cmdlets. + + + + New-Credential + + Username + + The username associated with the password + + System.String + + System.String + + + None + + + Password + + A Password as a SecureString + + System.Security.SecureString + + System.Security.SecureString + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + Password + + A Password as a SecureString + + System.Security.SecureString + + System.Security.SecureString + + + None + + + Username + + The username associated with the password + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> $Credential = New-Credential -Username user1 -Password (ConvertFrom-SecureString "P@ssw0rd" -AsPlainText -Force) + + Creating a credential + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-Credential.md#new-credential + + + + + + New-Password + New + Password + + Create a new password + + + + This function creates a password using the cryptographic Random Number Generator see the MSDN link for more details. + + + + New-Password + + Length + + An integer that defines how long the password should be + + System.Int32 + + System.Int32 + + + None + + + Count + + An integer that defines how many passwords to create + + System.Int32 + + System.Int32 + + + None + + + asSecureString + + Returns passwords as SecureStrings + + + System.Management.Automation.SwitchParameter + + + False + + + Strong + + A switch that if present will include special characters + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + asSecureString + + Returns passwords as SecureStrings + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Count + + An integer that defines how many passwords to create + + System.Int32 + + System.Int32 + + + None + + + Length + + An integer that defines how long the password should be + + System.Int32 + + System.Int32 + + + None + + + Strong + + A switch that if present will include special characters + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Object[] + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> New-Password -Length 64 -Count 5 -Strong + +Password +-------- +UkQfV)RHwcQ3a)s8Z#QwSCLxlI*y28kEPmcQUVM2HrACf@PxRJDLk4ffge#1m_8j +XfAwZOh_lrzLE8NwkSTPs5#LNkW4uZ0Wm_ST5UzERqhY45)HBpN$_@@MxDeLiosW +h(BN(y^Gip&pU$KJpAAajgopQyoSbCn41m53mc__wV@q$DY5a$iN&O0fnf9hvO1& +tXkFwY_pe(VIFf$R2^bKyKy)D_H6q^Nz7MgSDylXrV2GIkyiFVnvfbd9KENFuHQz +&6LPlWRB$#yqD@!IEuJ9JcMTKrsA_t(AbWRGTLx@2Fw__j08n(TGi6wgPE6XlLWg + + This example creates 5 strong passwords that are 64 characters long + + + + + + Online Version: + https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-Password.md#new-password + + + PowerShell Password Generator + http://www.peterprovost.org/blog/2007/06/22/Quick-n-Dirty-PowerShell-Password-Generator/ + + + MSDN RNG Crypto Service Provider + http://msdn.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx + + + + \ No newline at end of file diff --git a/ComputerManagement/ComputerManagement.psd1 b/ComputerManagement/ComputerManagement.psd1 index d00136a..3b8d644 100644 --- a/ComputerManagement/ComputerManagement.psd1 +++ b/ComputerManagement/ComputerManagement.psd1 @@ -1,9 +1,9 @@ # -# Module manifest for module 'PSGet_ComputerManagement' +# Module manifest for module 'ComputerManagement' # # Generated by: Jeffrey Patton # -# Generated on: 9/15/2020 +# Generated on: 5/26/2022 # @{ @@ -12,7 +12,7 @@ RootModule = 'ComputerManagement.psm1' # Version number of this module. -ModuleVersion = '1.1.2.2' +ModuleVersion = '1.1.2.3' # Supported PSEditions # CompatiblePSEditions = @() @@ -32,20 +32,20 @@ Copyright = '9/12/2020 4:02:47 PM' # Description of the functionality provided by this module Description = 'A PowerShell module for working with the local computer' -# Minimum version of the Windows PowerShell engine required by this module +# Minimum version of the PowerShell engine required by this module # PowerShellVersion = '' -# Name of the Windows PowerShell host required by this module +# Name of the PowerShell host required by this module # PowerShellHostName = '' -# Minimum version of the Windows PowerShell host required by this module +# Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' +# ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' @@ -114,11 +114,17 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = 'https://github.com/mod-posh/ComputerManagement/blob/master/CHANGELOG.md' + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + # External dependent modules of this module - # ExternalModuleDependencies = '' + # ExternalModuleDependencies = @() } # End of PSData hashtable - + } # End of PrivateData hashtable # HelpInfo URI of this module diff --git a/ComputerManagement/ComputerManagement.psm1 b/ComputerManagement/ComputerManagement.psm1 index ea282f6..7962122 100644 --- a/ComputerManagement/ComputerManagement.psm1 +++ b/ComputerManagement/ComputerManagement.psm1 @@ -638,14 +638,25 @@ function New-Credential { [Parameter(Mandatory = $true)] [string]$Username, [Parameter(Mandatory = $true)] - [securestring]$Password + $Password ) begin { } process { if ($PSCmdlet.ShouldProcess("New", "New Credential")) { - New-Object System.Management.Automation.PSCredential ($Username, $Password) + switch ($Password.GetType().Name.ToLower()) { + 'securestring' { + Write-Verbose "Found SecureString Password"; + New-Object System.Management.Automation.PSCredential ($Username, $Password); + } + 'string' { + Write-Verbose "Found String Password" + $SecureString = [System.Security.SecureString]::New(); + $Password.ToCharArray() | Foreach-Object { $SecureString.AppendChar($_) }; + New-Object System.Management.Automation.PSCredential ($Username, $SecureString); + } + } } } end { diff --git a/README.md b/README.md index 0a34745..fab1002 100644 Binary files a/README.md and b/README.md differ diff --git a/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.cab b/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.cab index 4907d83..8376db9 100644 Binary files a/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.cab and b/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.cab differ diff --git a/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.zip b/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.zip index 0cad199..845dfd1 100644 Binary files a/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.zip and b/cabs/ComputerManagement_9c9c5339-5b88-4f63-a664-d9bf90b7ed3a_en-US_HelpContent.zip differ diff --git a/docs/Backup-EventLog.md b/docs/Backup-EventLog.md index d55be76..ef1a533 100644 --- a/docs/Backup-EventLog.md +++ b/docs/Backup-EventLog.md @@ -32,7 +32,7 @@ Backup-EventLogs -ComputerName dc1 The location to copy the logs to. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -47,7 +47,7 @@ Accept wildcard characters: False The NetBIOS name of the computer to connect to. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -63,7 +63,7 @@ The path to the logs you wish to backup. The default logpath "C:\Windows\system32\winevt\Logs" is used if left blank. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: diff --git a/docs/Connect-Rdp.md b/docs/Connect-Rdp.md index dc071d6..792553e 100644 --- a/docs/Connect-Rdp.md +++ b/docs/Connect-Rdp.md @@ -53,7 +53,7 @@ This example shows passing the computernames over the pipe The hostname or IP address of the computer to connect to ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -69,7 +69,7 @@ A credential object that contains a valid username and password for the remote computer ```yaml -Type: PSCredential +Type: System.Management.Automation.PSCredential Parameter Sets: (All) Aliases: diff --git a/docs/Export-EventLog.md b/docs/Export-EventLog.md index 8ba6167..0a8a1ec 100644 --- a/docs/Export-EventLog.md +++ b/docs/Export-EventLog.md @@ -73,7 +73,7 @@ To get events and event logs from remote computers, the firewall port for the event log service must be configured to allow remote access. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -90,7 +90,7 @@ The default value is the current user. ```yaml -Type: PSCredential +Type: System.Management.Automation.PSCredential Parameter Sets: (All) Aliases: @@ -105,7 +105,7 @@ Accept wildcard characters: False The full path and filename to where the log should be exported to. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -121,7 +121,7 @@ If present the function will list all the logs currently available on the computer. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -136,7 +136,7 @@ Accept wildcard characters: False Export messages from the specified LogName ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-DiskUsage.md b/docs/Get-DiskUsage.md index 93f330a..2c7f1b6 100644 --- a/docs/Get-DiskUsage.md +++ b/docs/Get-DiskUsage.md @@ -73,7 +73,7 @@ This example shows piping the output through Sort-Object The path to check ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: diff --git a/docs/Get-InvalidLogonAttempt.md b/docs/Get-InvalidLogonAttempt.md index a5c8e70..2e001aa 100644 --- a/docs/Get-InvalidLogonAttempt.md +++ b/docs/Get-InvalidLogonAttempt.md @@ -51,7 +51,7 @@ a csv file. The name of the computer to pull logs from ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -71,7 +71,7 @@ entries. This can be modified to suit your needs. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -90,7 +90,7 @@ this particular script was designed to find a specific entry. This can be modified to suit your needs. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-MappedDrive.md b/docs/Get-MappedDrive.md index bcae6fb..0a07def 100644 --- a/docs/Get-MappedDrive.md +++ b/docs/Get-MappedDrive.md @@ -59,7 +59,7 @@ will be prompted. The name of the computer to get the list from. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -74,7 +74,7 @@ Accept wildcard characters: False A credentials object to pass if needed. ```yaml -Type: PSCredential +Type: System.Management.Automation.PSCredential Parameter Sets: (All) Aliases: diff --git a/docs/Get-NetShare.md b/docs/Get-NetShare.md index dda4226..0090e07 100644 --- a/docs/Get-NetShare.md +++ b/docs/Get-NetShare.md @@ -41,7 +41,7 @@ This example shows the basic usage for this function The name of the server that has file or print shares ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -58,7 +58,7 @@ This will be either Print or Disk Disk returns file shares ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: diff --git a/docs/Get-NonStandardServiceAccount.md b/docs/Get-NonStandardServiceAccount.md index 1ab5575..5c32b25 100644 --- a/docs/Get-NonStandardServiceAccount.md +++ b/docs/Get-NonStandardServiceAccount.md @@ -74,7 +74,7 @@ The back-tick (\`) was used for readability purposes only. The NetBIOS name of the computer to pull services from. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -89,7 +89,7 @@ Accept wildcard characters: False The DOMAIN\USERNAME of an account with permissions to access services. ```yaml -Type: PSCredential +Type: System.Management.Automation.PSCredential Parameter Sets: (All) Aliases: @@ -104,7 +104,7 @@ Accept wildcard characters: False This is a pipe (|) seperated list of accounts to filter out of the returned services list. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: diff --git a/docs/Get-OpenFile.md b/docs/Get-OpenFile.md index 9c1022f..186f80e 100644 --- a/docs/Get-OpenFile.md +++ b/docs/Get-OpenFile.md @@ -42,7 +42,7 @@ This example shows the basic usage of this command. The NetBIOS or FQDN of the computer ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-OpenSession.md b/docs/Get-OpenSession.md index d74d893..0e27ee1 100644 --- a/docs/Get-OpenSession.md +++ b/docs/Get-OpenSession.md @@ -42,7 +42,7 @@ This example shows the basic usage of the command. This is the FQDN or NetBIOS name of the computer ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-PendingUpdate.md b/docs/Get-PendingUpdate.md index 4dcee25..d92ac54 100644 --- a/docs/Get-PendingUpdate.md +++ b/docs/Get-PendingUpdate.md @@ -32,7 +32,7 @@ Get-PendingUpdates Computer or computers to find updates for. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: diff --git a/docs/Get-PrinterLog.md b/docs/Get-PrinterLog.md index b5d51b2..301b4ca 100644 --- a/docs/Get-PrinterLog.md +++ b/docs/Get-PrinterLog.md @@ -52,7 +52,7 @@ This is the syntax that I would see being used the most. The name of your print server. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -67,7 +67,7 @@ Accept wildcard characters: False The default log for printing on Windows Server 2008 R2 is specified. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-RDPLoginEvent.md b/docs/Get-RDPLoginEvent.md index 799a355..fe38c92 100644 --- a/docs/Get-RDPLoginEvent.md +++ b/docs/Get-RDPLoginEvent.md @@ -44,7 +44,7 @@ This example shows piping the output to Format-Table This is the NetBIOS name of the computer to pull events from. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: @@ -59,7 +59,7 @@ Accept wildcard characters: False A user account with the ability to retreive these events. ```yaml -Type: PSCredential +Type: System.Management.Automation.PSCredential Parameter Sets: (All) Aliases: diff --git a/docs/Get-ServiceTag.md b/docs/Get-ServiceTag.md index 9166081..8446f1a 100644 --- a/docs/Get-ServiceTag.md +++ b/docs/Get-ServiceTag.md @@ -36,7 +36,7 @@ SerialNumber The NetBIOS name of the computer. ```yaml -Type: Object +Type: System.Object Parameter Sets: (All) Aliases: diff --git a/docs/Get-WinEventTail.md b/docs/Get-WinEventTail.md index a2c7aef..99dcf80 100644 --- a/docs/Get-WinEventTail.md +++ b/docs/Get-WinEventTail.md @@ -44,7 +44,7 @@ TimeCreated Id LevelDisplayName Message Specify a valid Windows Eventlog name ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -59,7 +59,7 @@ Accept wildcard characters: False An integer to show the number of events to start with, the default is 10 ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: diff --git a/docs/Grant-RegistryPermission.md b/docs/Grant-RegistryPermission.md index 9f9013e..def0ce0 100644 --- a/docs/Grant-RegistryPermission.md +++ b/docs/Grant-RegistryPermission.md @@ -44,7 +44,7 @@ See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags(v=vs.110).aspx ```yaml -Type: InheritanceFlags +Type: System.Security.AccessControl.InheritanceFlags Parameter Sets: (All) Aliases: Accepted values: None, ContainerInherit, ObjectInherit @@ -60,7 +60,7 @@ Accept wildcard characters: False A registry path ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -75,7 +75,7 @@ Accept wildcard characters: False Username in DOMAIN\User format ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -94,7 +94,7 @@ See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags(v=vs.110).aspx ```yaml -Type: PropagationFlags +Type: System.Security.AccessControl.PropagationFlags Parameter Sets: (All) Aliases: Accepted values: None, NoPropagateInherit, InheritOnly @@ -112,7 +112,7 @@ See http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights(v=vs.110).aspx ```yaml -Type: RegistryRights +Type: System.Security.AccessControl.RegistryRights Parameter Sets: (All) Aliases: Accepted values: QueryValues, SetValue, CreateSubKey, EnumerateSubKeys, Notify, CreateLink, Delete, ReadPermissions, WriteKey, ExecuteKey, ReadKey, ChangePermissions, TakeOwnership, FullControl diff --git a/docs/New-Credential.md b/docs/New-Credential.md index fcd073b..9403d35 100644 --- a/docs/New-Credential.md +++ b/docs/New-Credential.md @@ -34,7 +34,7 @@ Creating a credential A Password as a SecureString ```yaml -Type: SecureString +Type: System.Security.SecureString Parameter Sets: (All) Aliases: @@ -49,7 +49,7 @@ Accept wildcard characters: False The username associated with the password ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -64,7 +64,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -80,7 +80,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/docs/New-Password.md b/docs/New-Password.md index 03db5f9..11966ff 100644 --- a/docs/New-Password.md +++ b/docs/New-Password.md @@ -44,7 +44,7 @@ This example creates 5 strong passwords that are 64 characters long Returns passwords as SecureStrings ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -59,7 +59,7 @@ Accept wildcard characters: False An integer that defines how many passwords to create ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -74,7 +74,7 @@ Accept wildcard characters: False An integer that defines how long the password should be ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -89,7 +89,7 @@ Accept wildcard characters: False A switch that if present will include special characters ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -104,7 +104,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -120,7 +120,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi