bin/SnsPsModule.xml
<?xml version="1.0"?>
<doc> <assembly> <name>SnsPsModule</name> </assembly> <members> <member name="T:SnsPsModule.AddSnsAdGroupMember"> <summary> <para type="synopsis">Adds Specified Members To Specified AD Group.</para> <para type="description">Adds Specified Members To Specified AD Group.</para> <para type="description"> Within Active Directory Exists A Threshold Related With The Number Of Values That Can Be Retrieved From A Single Attribute. That Threshold Depends From The Domain And The Forest Functional Level At The Time When The First Domain Controller Was Promoted. With The Consequent Elevation Of The Domain And The Forest Functional Level The Threshold Remains Intact And Not Modified. </para> <para type="description"> In Order To Avoid That Limitation Whenever A Group Contains Large Number Of Members, The CmdLet Performs The Verification Via Evaluating The Members "memberOf" Attribute. Although It Is Multivalued Attribute As Well And Is Affected By The Same Limitation, The Possibility A User To Be Member Of That Many Groups Is Not Likely. Moreover The Users Access Token Will Break Because Of The Large Number Of Groups Long Before The Limitation About Number Of Displayed Values To Be Reached. For Example For The Forests Initially Built With Windows 2000 The Limitation Is 1000. So It Is Likely To Have Groups With More Than 1000 Members, But It Is Not Likely To Have A User Member Of That Many Groups. </para> <para type="description"> Verification Of The Groups Adding Via Evaluation Of The Added Object "memberOf" Attribute Introduce Some Limitations As Well. The CmdLet Needs To Perform More Queries Against The Active Directory And Need To Handle More Data, Which Means That From Performance Perspective It Is Slower In Relation With The Other CmdLets. Additionally The Verification Might Not Work As Expected Whenever A User From One Domain In A Forest Is Added To A Group Located In Different Domain In The Same Forest. </para> <para type="description"> In The Cases When Is Need To Manage The Group Membership Of Groups With Small Number Of Members Is Preferable To Be Used "Add-SnsAdMultiValuedStringAttributeValue" CmdLet Against The Group Object And Attribute "member". This Applies As Well For The Scenarios Whenever The Added Member Is From Different Domain Than The Managed Group. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdGroupMember]$objResult = Add-SnsAdGroupMember ` -GroupIdentity "CN=Group01,OU=Groups,DC=contoso,DC=com" ` -MemberIdentity "CN=John Smith,OU=Users,DC=contoso,DC=com"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.AddSnsAdGroupMember.MemberIdentity"> <summary> <para type="description">Specifies The Identity Of An AD Object To Be Added As Member Into The Specified Group.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> <para type="description"> Whenever The CmdLet Will Be Used To Add Multiple User Accounts From Different AD Domains In Multi Domain Forest Must Be Used "AdsPath" With Included Domain Controller From The Corresponding Domain Where The Specified Domain Object Is Located. </para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdGroupMember.GroupIdentity"> <summary> <para type="description">Specifies The Identity Of AD Group To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdGroupMember.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdGroupMember.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue"> <summary> <para type="synopsis">Adds Values To AD Object Multi Valued String Attribute Preserving The Existing Values.</para> <para type="description">Adds Values To AD Object Multi Valued String Attribute Preserving The Existing Values.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdMultiValuedString]$objResult = Add-SnsAdMultiValuedStringAttributeValue ` -Identity "CN=Group01,OU=Groups,DC=contoso,DC=com" -Attribute "msExchExtensionCustomAttribute1" ` -Value "TestValue01"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> <para type="description"> Although The CmdLet Can Be Used To Add Values To Any Multi Valued String Attribute. It Is Not Good Idea To Be Used For Adding Of Group Members. The Active Directory Have A Limitation Related With The Reverted Number Of Values Within An Attribute. Therefore If The Group Members Are Above The Threshold, The Adding Verification Will Fail Because The New Member Will Be Not Among The Reverted Results. For That Purpose Is Preferable To Be Used The CmdLets With Noun SnsAdGroupMember From This Module. </para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue.Value"> <summary> <para type="description">Specifies The Members Which Have To Be Added To The Specified Attribute.</para> </summary> </member> <member name="P:SnsPsModule.AddSnsAdMultiValuedStringAttributeValue.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.ClearSnsAdAttribute"> <summary> <para type="synopsis">Clears The Specified AD Attribute Value For The Specified AD Object.</para> <para type="description">Clears The Specified AD Attribute Value For The Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdClearAttribute]$objResult = Clear-SnsAdAttribute ` -Identity "CN=Group01,OU=Groups,DC=contoso,DC=com" -Attribute "member"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.ClearSnsAdAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.ClearSnsAdAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.ClearSnsAdAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Cleared As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.ClearSnsAdAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Clear The Specified Values From The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.ConvertFromSnsIADsLargeInteger"> <summary> <para type="synopsis">Converts AD Specific IADsLargeInteger Objects To Regular System.Int64 Struct.</para> <para type="description">Converts AD Specific IADsLargeInteger Objects To Regular System.Int64 Struct.</para> <para type="description"> NOTE: The IADsLargeInteger Values Usually Cannot Be Taken Directly From The AD Object Property Which Contains IADsLargeInteger Value Type. Normally Those AD Properties Are Presented As COM Objects, Which Have "Value" Property. The Command-Let Will Expect The Value Taken From The "Value" Property Of The AD Object Property. Please Refer To The Example Below. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.Int64[]]$intPwdLastSet = ConvertFrom-SnsIADsLargeInteger $AdsiUser.pwdLastSet.Value; </code> <para></para> </example> <example> <code> [System.DateTime]$datPwdLastSet = [System.DateTime]::FromFileTime($(ConvertFrom-SnsIADsLargeInteger $([ADSI]"LDAP://$($strDN)").pwdLastSet.Value)); </code> <para></para> </example> <example> <code> [System.DateTime]$datPwdLastSet = ([System.DateTime]'1601-01-01').AddTicks($(ConvertFrom-SnsIADsLargeInteger $AdsiUser.pwdLastSet.Value)).ToLocalTime(); </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.ConvertFromSnsIADsLargeInteger.IADsLargeIntegerValue"> <summary> <para type="description">Specifies An Active Directory IADsLargeInteger Value.</para> <para type="description">Keep In Mind That ADSI Properties Are Hash Tables And Value Property Shall Be Used.</para> <para type="description">like $objAdsiAccount.pwdLastSet.Value</para> </summary> </member> <member name="T:SnsPsModule.ConvertFromSnsIpAddressString"> <summary> <para type="synopsis">Converts IP V4 Address String To System.UInt32</para> <para type="description">Converts IP V4 Address String To System.UInt32</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.UInt32[]]$IpNumeric = ConvertFrom-SnsIpAddressString -IpAddress '192.168.1.1'; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.ConvertFromSnsIpAddressString.IpAddress"> <summary> <para type="description">Specifies IP V4 String.</para> </summary> </member> <member name="T:SnsPsModule.GetSnsAdAttribute"> <summary> <para type="synopsis">Extracts Attribute Entries From The Active Directory Schema.</para> <para type="description">Extracts Attribute Entries From The Active Directory Schema.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdAttribute[]]$arrAttr = Get-SnsAdAttribute -Attribute userPrincipalName, displayName; </code> <para>Gets The Specified Active Directory Attributes.</para> <para></para> </example> <example> <code> [SnsPsModule.SnsAdAttribute[]]$arrAttr = Get-SnsAdAttribute -All; </code> <para>Gets All Active Directory Attributes.</para> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.GetSnsAdAttribute.Attribute"> <summary> <para type="description">Specifies Active Directory Attribute lDAPDisplayName.</para> <para type="description">This Is The Attribute Name As Displayed In ADSIEdit Console.</para> <para type="description">Accepts Star (*) As Wildcard Character.</para> <para type="description">Question Mark (?) Is Not Accepted In LDAP Queries. https://bit.ly/2RFdUr2</para> </summary> </member> <member name="P:SnsPsModule.GetSnsAdAttribute.All"> <summary> <para type="description">Specifies To The CmdLet To Exctract All Attributes From AD Schema.</para> </summary> </member> <member name="T:SnsPsModule.InvokeSnsParallelRunSpaces"> <summary> <para type="synopsis">This CmdLet Creates And Manages PowerShell Runspaces Thru Their Lifecycle To Have Multi-Threading Like Experience.</para> <para type="description">This CmdLet Creates And Manages PowerShell Runspaces Thru Their Lifecycle To Have Multi-Threading Like Experience.</para> <para type="description"> The Default PowerShell Session Is Single-Threaded. It Runs One Command And When It Finishes, It Moves To The Next Command. This Is Nice As It Keeps Everything Repeatable And Does Not Use Many Resources. But What If The Actions It Is Performing Are Not Dependent On One Another And You Have The CPU Resources To Spare? In That Case, It Is Time To Start Thinking About Multi-Threading. </para> <para type="description"> Multithreading Is A Way To Run More Than One Command At A Time. The Primary Benefit Of Multi-Threading Is To Decrease The Runtime Of The Code. This Time Decrease Is At The Tradeoff A Higher Processing Power Requirement. When Multi-Threading, Many Actions Are Being Performed At Once Thus Requiring More System Resources. </para> <para type="description">When Using Multi-Threading Have To Be Considered:</para> <para type="description"> -- Code Optimization - Using A Code Which Is Not Performance Optimized Will Cause Excessive System Resource Usage. The Effect Is Being Multiplied By The Number Of Threads Running In Parallel. Let Us Explain This With An Example: </para> <para type="description">Get-Process | Where-Object {$_.ProcessName -eq "PowerShell"}</para> <para type="description">Will Require Much More Resources And Time To Complete Than</para> <para type="description">Get-Process -Name "PowerShell"</para> <para type="description"> Because The First Command Have To Enumerate All The System Processes, Process The Output And Send It To The Pipeline Then The Second Command Have To Filter Out All The Processes Except "PowerShell", While In The Second Example The Get-Process Command Will Enumerate Only System Processes With Name "PowerShell". The Same Result Is Achieved With Less System Resources And Much Faster. In Case That Is Run In Multiple Threads This Will Be Multiplied By Their Number. </para> <para type="description"> -- Thread-Safe Code - The Code Run Within Multiple Threads Must Be Adapted For That. In Case Multiple Threads Write To The Same File Or A DataBase Not Optimized For Handling Of The DataBase Locks Like Most Of The Free Serverless DataBase Solutions, Might Lead To File Or DataBase Locks And Failure Of The Code Within The Threads And Data Loss. In All The Cases The Updates In Those Files / DataBases Will Be Scrambled Because The Threads Run Asynchronously And There Is No Guarantee That They Will Finish In The Order They Are Started. Writing Into A Single Destination Is Considered As Thread-Unsafe Action, While Reading Is Considered As Thread-Safe Because All The Threads Will Receive The Same Input. Dependency Of The Asynchronously Run Threads On Each Other Is Considered As Thread-Unsafe As Well. This Ruins The Whole Point And Benefit Of Multi-Threading In Case A Thread Waits Another Thread To Finish To Receive Its Output We Have No Gain In The Code Runtime The Code Is Executed Like In A Single Thread One Command At A Time And The Next Is Run After The First One Finishes. </para> <para type="description"> -- Performance Considerations - When Multi-Threading The Consumed System Resources Are Multiplied By The Number Of Threads And Resources Are Used For The Threads Management Too. Running Multiple Threads Simultaneously Might Quickly Consume The System Resources And Cause The System To Crash. To Prevent That The Number Of Simultaneously Run Threads Have To Be Limited. According To The Best Practices The Number Of Threads Running In Parallel Should Not Exceed The Number Of CPU Cores. When Exceeded We Have No Real Performance Gain As A CPU Have To Switch Between The Threads. At The End, The Code Runtime Will Be Even Higher In Comparison With Limiting The Number Of Parallel Running Threads. </para> <para type="description"> We Can Have Multi-Threading In PowerShell In One Of Two Ways: Via Using PowerShell Jobs And Using PowerShell Run Spaces. Each Of Those Represent A Single PowerShell Session And Is Single Threaded, However We Can Have Multiple Of Those Managed From A Single PowerShell Session. Both Ways Multi-Threading Requires Complex Logic For Creation, Monitoring, Output Extraction, Error Extraction And Disposal Of The Threads. Management Of PowerShell Jobs Is Quite Different Than The Managing Of The PowerShell Run Spaces. The PowerShell Jobs And PowerShell Run Spaces Have Their Advantages And Disadvantages. The PowerShell Spaces Cannot Be Managed Via PowerShell Directly, They Are Managed From Within.NET, Which Makes Them Lighter Faster And Easier For Management. From Other Hand The PowerShell Jobs Are Managed Using CmdLets Present In "Microsoft.PowerShell.Core" Module Distributed With The PowerShell Since PowerShell v3.0. Although The PowerShell Jobs Are More Complicated In Comparison With The PowerShell Run Spaces, Their Advantage Is That Multiple PowerShell CmdLets Can Automatically Make PowerShell Jobs On Your Behalf. The PowerShell Job Still Remain On The Machine Where The Job Is Created, But The Job Itself Is Used Only To Manage The Remote Session And Exchange Data Between The Job And The Remote Machine Such Like Sending Script Block And Receiving Output. </para> <para type="description"> Invoke-SnsParallelRunSpaces CmdLet Is Intended To Automatically Manage PowerShell Run Spaces, Thus Simplifying The PowerShell Multi-Threading Without Need To Care, About Run Spaces Creation, Number Of Simultaneously Running Run Spaces, Sending Of The Run Spaces Code, Receiving Run Spaces Output And Errors And Run Spaces Disposal. </para> <para type="description"> Invoke-SnsParallelRunSpaces CmdLet Allows A Single Script Block To Be Specified To Multiple Threads, It Cannot Work With Individual ScriptBlocks For The Treads. However It Allows Providing Individual Arguments To The Threads. Since The ScriptBlock Is Specified By The User At The CmdLet Run Time, At The CmdLet Write Time Cannot Be Estimated The Number Of, The Parameter Names And Parameter Types. Therefore It Is Not Possible They To Be Included Into The CmdLet As CmdLet Parameters. The Way The Arguments Are Send To The Job, Is Using Splatting Hashtable. For More Details How The Splatting Works Please Refer To The PowerShell Documentation "about_Splatting" Article: </para> <para type="description"> https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_splatting </para> <para type="description"> There Is No Need The Arguments Send To The Run Space To Be Reflected In The Thread Command Using Splatting. The CmdLet Will Do So On Your Behalf. For Example: </para> <para type="description">$a = @{ "Name" = "powershell"; "Verbose" = $true; };</para> <para type="description">Invoke-SnsParallelRunSpaces -ThreadCommand "Get-Process" -Identity @(0..49) -Local -ThreadArguments $a;</para> <para type="description"> To Complete More Complex Tasks, When Only A Single Command Can Be Send To A Thread, The Thread Code Must Be Provided In A Function Or A CmdLet In "InitializationScript" Parameter And Then To Call That Function In "ThreadCommand" Parameter With The Required Arguments. The Same Applies Whenever Within The Thread Have To Be Run A Single CmdLet, But The CmdLet Belongs To A PowerShell Module Which Have To Be Imported In The Run Space. When The Threads Are Run On Remote Machine All Used PowerShell Modules Must Be Available On The Destination Machine. For More Details Please Refer To Examples Section. </para> <para type="description"> It Is Useful To Verify Whether The Remote Session Is Established On The Intended Destination Before To Do Anything. Especially When The Destination Is A Workstation. It Is Quite Common Those Days The Users To Work Remotely Connecting To The Corporate Environment Using VPNs. In Certain Scenarios You Might Connect To A Different Than The Intended Machine. When Connected Via VPN A Machine Will Register Its Internal IP Address On The DNS Servers. On The Following Day, The Same IP Address Might Be Assigned To Another Machine. If The Machine Where You Want To Connect To, Does Not Connect To The VPN On The Following Day, Or You Try To Connect To The Machine Before The VPN Is Started, Its DNS Entry Will Have Value The IP Address From The Previous Day, Which Is Now Given To Another Machine. In This Case When Establish A Remote Session To Specific Machine Using FQDN, The DNS Server Reverts The IP Address Of Another Machine, The Remote Session Will Be Established Against Wrong One. If You Do Not Make A Verification Within Your Code, You Will Make Changes On The Wrong Machine, Or The Received Output Will Be Irrelevant. This Is Not An Issue Or Bug In The CmdLet Itself. A Friend Of Mine Did That Recently Connecting With Remote Desktop Connection To A Different Than The Expected Machine Using Neither This Module Nor This CmdLet. </para> <para type="description"> Important Consideration To Keep In Mind Is That The PowerShell Environment Variables Will Be Not Available, And The PowerShell Automatic Modules Import Will Not Work. For The Environment Variables Can Be Used .NET Ones Whenever They Corresponds To The Needed One. To Address The Lack Of Automatic Modules Load, You Shall Always Import Explicitly The Modules That Contain The Commands You Need, Even Those That Are Distributed With PowerShell Itself, This Might Vary Depending On The Destination Machine Operating System And PowerShell Version. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> $a = @{ "Name" = "powershell"; "Verbose" = $true; }; </code> <para> Initializes A Hashtable Variable With Keys That Corresponds To "Get-Process" Parameter Names And Values That Corresponds To The Arguments Which Will Be Provided To The Used Parameters. </para> <code> (Invoke-SnsParallelRunSpaces -ThreadCommand "Get-Process" -Identity @(0..49) -Local -ThreadArguments $a).Output; </code> <para> Runs "Get-Process" CmdLet Within 50 Local Parallel Run Spaces. From The Reverted Output Objects Collection Is Taken The "Output" Property. </para> <para> The Output Object Contains Properties For The Run Space Name, PowerShell Run Space Status And All PowerShell Streams Extracted From The Run Space. In Sometimes Specific Streams Extraction Will Revert No Results. In This Specific Case The Verbose Stream Will Be Empty, Because "Get-Process" CmdLet Does Not Revert Any Verbose Messages. </para> <para></para> </example> <example> <code> $strBlock = @' Function Invoke-SnsThreadCode() { [CmdletBinding(PositionalBinding = $false)] Param( [Parameter(Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)] [ValidateNotNullOrEmpty()][System.String]$Path, [Parameter(Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)] [ValidateNotNullOrEmpty()][System.String]$Name ) Begin { Import-Module -FullyQualifiedName ` "C:\Program Files\WindowsPowerShell\Modules\SnsPsModule\1.0.1.2\SnsPsModule.psd1"; Write-Verbose "$($Name)"; Return New-SnsZipArchive -Path "$($Path)" -PassThru -Force -Keep -Verbose:$Verbose.IsPresent; } } '@; </code> <para> Assigns On A String Variable The Code Of An Explicitly Specified As CmdLet Function. The Function Does Not Need To Be Defined As A CmdLet, But It Helps, Because The Code Requirements Are Stricter And Any Code Error Will Be Not Tolerated. Within The Function Is Loaded The Current Module Using Its Path. Lead Using Module Name Might Not Work Depending On The PowerShell Version. In Case A Module Is Installed With Scope "All Users" It Will Be Located At "C:\Program Files\WindowsPowerShell\Modules" The Remaining Part Of The Path Is Module And Version Specific. The Function Is Intended To ZIP A Specific File Using "New-SnsZipArchive" From The Current PSModule. Depending On The PowerShell Version The Automatic PSModule Import Might Not Work Within The Nested Run Spaces. It Is A Good Practice The Modules To Be Explicitly Imported. </para> <code> $files = Get-ChildItem -Path "C:\MyFolder"; </code> <para>Enumerates All Files Within Folder "MyFolder".</para> <code> $a = $files | ForEach { Return @{ "Name" = "$($_.Name)"; "Path" = "$($_.FullName)"; "Verbose" = $true; } }; </code> <para> Process Each Of The Enumerated Files And Creates A Hashtable Collection With Member Hashtables Corresponding To Each Of The Enumerated Files. Each Hashtable With Keys "Name", "Path" And "Verbose". Please Notice That Our CmdLet Defined In The Beginning Have No Verbose Parameter Defined. This Parameter Is Defined Automatically And Cannot Be Defined Manually When The Function Is Defined As CmdLet. </para> <code> $b = Invoke-SnsParallelRunSpaces -InitializationScript $strBlock -ThreadCommand "Invoke-SnsThreadCode" -Identity $a.Name -Local -ThreadArguments $a -Verbose; </code> <para> Runs The Defined In The Beginning CmdLet In Local Parallel Run Spaces To Archive Each Individual File Into ZIP File. The Maximum Number Of Running Run Spaces At Any Moment Is Automatically Enumerated Using The Logical CPU Cores Available On The Machine. The Output Is Assigned To A Variable. </para> <para> Because The Parallel Threads Are Named With The File Name The Extraction Of The Required Output From The Output Collection Is Easier. </para> <code> $b | ft Identity, State, Output; </code> <para>Displays The Threads Output On The Console Window.</para> <para></para> </example> <example> <code> $strBlock = @' Function Get-SnsProcess() { [CmdletBinding(PositionalBinding = $false)] Param( [Parameter(Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)] [ValidateNotNullOrEmpty()][System.String]$Name ) Begin { Write-Information "Write-Information 1"; Write-Warning "Write-Warning 1"; Write-Verbose "Write-Verbose 1"; Write-Host "Write-Host 1"; Write-Error "Write-Error 1"; Start-Sleep -Seconds 1; Write-Information "Write-Information 2"; Write-Warning "Write-Warning 2"; Write-Verbose "Write-Verbose 2"; Write-Host "Write-Host 2"; Write-Error "Write-Error 2"; return Get-Process -Name $Name; } } '@; </code> <para> Assigns On A String Variable The Code Of An Explicitly Specified As CmdLet Function. The Function Does Not Need To Be Defined As A CmdLet, But It Helps, Because The Code Requirements Are Stricter And Any Code Error Will Be Not Tolerated. Defining The Function As CmdLet Does Provide Us With The CmdLet Common Parameters Without The Need To Define Them. </para> <code> $a = @{ "Name" = "powershell"; "Verbose" = $true; }; </code> <para> Defines A Single Hashtable Object And Assign It On A Variable. The Hashtable Keys Corresponds To The Defined In The Beginning Function. "Verbose" Parameter Is Not Defined In The Function But It Is Available Automatically Along With All CmdLet Common Parameters Because The Function Is Defined As CmdLet. </para> <code> $b = @( "computer1.contoso.local", "computer2.contoso.local", "computer3.contoso.local" ); </code> <para> Defines A String Collection With List Of Computer Fully Qualified Domain Names (FQDN) And Assign It To A Variable. </para> <code> $c = Import-SnsCredentialFile -FilePath "C:\Creds\CONTOSO@@Administrator.ini" </code> <para> Imports And Assigns To A Variable Single Credential Object From An Encrypted File. </para> <para> For More Information About Importing From Encrypted Files Run: "Get-Help Import-SnsCredentialFile -Full;" </para> <para> For More Information About Exporting To Encrypted Files Run: "Get-Help Export-SnsCredentialFile -Full;" </para> <code> $d = Invoke-SnsParallelRunSpaces -InitializationScript $scrBlock -ThreadCommand "Get-SnsProcess" -Identity $b -Remote -ThreadArguments $a -MaxDuration 1 -Credential $c -Verbose; </code> <para> Runs The Specified In The Beginning Function On All Remote Computers. The Number Of Running Run Spaces At Any Given Moment Is Automatically Defined And Depends On The Available CPU Cores On The Machine Multiplied By Four. Since The Machine That Is Running The Command Have Only The Tasks To Manage The Run Spaces And The Threads Code Is Run Remotely, The CmdLet Evaluates Larger Number Of Simultaneously Running Run Spaces In Comparison With The Local Execution. </para> <para> In "RemoteExecution" Parameter Set We Are Required To Specify Machines Fully Qualified Domain Names (FQDNS) To "Identity" Parameter. </para> <para> In "ThreadArguments" Parameter We Specify Single Hashtable About The Arguments Send To The Custom Function. If We Need Different Arguments To Be Send To The Threads, Must Be Specified A Hashtable Array With Members Corresponding To Each Thread. Lets Say For Example We Need To Enumerate Processes With Name "PowerShell" Running On Computer1, Processes With Name "Notepad" Running On Computer2 And Process With Name "Idle" On Server3. </para> <para> In "Credential" Parameter We Specify Single Credential Object To Authenticate Against All Of The Remote Machines. If We Need To Authenticate With Different Credentials On The Remote Machines, Must Be Specified A Credential Array With Members Corresponding To Each Remote Machine. </para> <para> In "MaxDuration" Parameter We Specify That All Run Spaces Must Run For A Duration Of One Minute. In The End Of The Duration Period All Not Completed Threads Will Be Cancelled. </para> <para> Because The Parallel Threads Are Named With The Remote Machines FQDN The Extraction Of The Required Output From The Output Collection Is Easier. </para> <code> $d | ft Identity, State, Output; </code> <para>Displays The Threads Output On The Console Window.</para> <para></para> </example> <example> <code> $strBlock = @' Function Get-SnsCpuUsage() { [CmdletBinding()] Param() Begin { return Get-WmiObject Win32_Processor | ` Measure-Object -Property "LoadPercentage" -Average | ` Select-Object -ExpandProperty Average; } } '@; </code> <para> Assigns On A String Variable The Code Of An Explicitly Specified As CmdLet Function. The Function Does Not Need To Be Defined As A CmdLet, But It Helps, Because The Code Requirements Are Stricter And Any Code Error Will Be Not Tolerated. Defining The Function As CmdLet Does Provide Us With The CmdLet Common Parameters Without The Need To Define Them. In This Case We Need Not To Have Any Parameters. During The Remote Execution Of The Function We Will Send No Arguments To The Remote Machines. </para> <code> $arr = @(); </code> <para> Initializes An Empty Array Variable. </para> <code> [System.Object]$obj = New-Object -TypeName "System.Object"; </code> <para> Initializes An Empty Object Variable. </para> <code> $obj | Add-Member -Force:$true -MemberType "NoteProperty" -Name "Identity" -Value "computer1.contoso.local"; </code> <para> Adds Property "Identity" To The Previously Initialized Object. The Property Name Is Matching The CmdLet’s "Identity" Parameter Name. </para> <code> $obj | Add-Member -Force:$true -MemberType "NoteProperty" -Name "Credential" -Value ( $(Import-SnsCredentialFile -FilePath "C:\Creds\CONTOSO@@Administrator.ini") ); </code> <para> Adds Property "Credential" To The Previously Initialized Object. The Property Name Is Matching The CmdLet’s "Credential" Parameter Name. The Value Is The Imported Credential Object To Authenticate To "computer1.contoso.local". </para> <code> $arr += $obj; </code> <para> Adds The Custom Object Into The Previously Initialized Array. </para> <code> [System.Object]$obj = New-Object -TypeName "System.Object"; </code> <para> Initializes New Empty Object Variable. </para> <code> $obj | Add-Member -Force:$true -MemberType "NoteProperty" -Name "Identity" -Value "computer1.fabricam.local"; </code> <para> Adds Property "Identity" To The Previously Initialized Object. The Property Name Is Matching The CmdLet’s "Identity" Parameter Name. Notice The Remote Computer FQDN Is Different. </para> <code> $obj | Add-Member -Force:$true -MemberType "NoteProperty" -Name "Credential" -Value ( $(Import-SnsCredentialFile -FilePath "C:\Creds\FABRICAM@@Administrator.ini") ); </code> <para> Adds Property "Credential" To The Previously Initialized Object. The Property Name Is Matching The CmdLet’s "Credential" Parameter Name. The Value Is The Imported Credential Object To Authenticate To "computer1.fabricam.local". </para> <code> $arr += $obj; </code> <para> Adds The Custom Object Into The Previously Initialized Array. </para> <code> $a = $arr | Invoke-SnsParallelRunSpaces -InitializationScript $strBlock -ThreadCommand "Get-SnsCpuUsage" -Remote -MaxDuration 1 -Verbose; </code> <para> Working With Pipeline Example. Here We Are Sending To The Pipeline Custom Objects With Properties Matching The CmdLet Parameters Which Accept Pipeline Input Via "ValueFromPipelineByPropertyName" Method. No Arguments Are Send To The Remote Jobs Because Our Function Does Not Need Any. In Case They Are Needed Can Be Either Added As Properties To The Custom Objects Sent To The Pipeline Or Specified To The CmdLet "ThreadArguments" Parameter. </para> <para></para> </example> <example> <code> $a = Get-ChildItem -Path "C:\MyFolder" | ForEach { Return @{ "Path" = "$($_.FullName)"; "PassThru" = $true; "Force" = $true; "Keep" = $true; } }; </code> <para> Whenever The PowerShell Version Is High Enough And The PowerShell Modules Auto Loading Is Working, The Parallel Archive Looks Like A Breeze. Here We Just Enumerate All The Items In The Folder And Create Thread Arguments Hashtable Corresponding To Each File. </para> <code> $b = Invoke-SnsParallelRunSpaces -ThreadCommand "New-SnsZipArchive" -Identity $a.Path -Local -ThreadArguments $a -Verbose; </code> <para> And Here We Just Run "Invoke-SnsParallelRunSpaces" To ZIP All Files. There Is No Need Of "InitializationScript" Because We Are Running A Single CmdLet And We Call That CmdLet In "ThreadCommand" Parameter. The Automatic PSModule Load Will Take Care To Load The Current Module Within Each Of The Run Spaces. </para> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.ThreadCommand"> <summary> <para type="description">Specifies A Single PowerShell Statement To Be Run Within The Parallel Thread.</para> <para type="description">The Thread Command Can Be Provided In Type Of ScriptBlock Or String.</para> <para type="description"> The Parameter Accepts A Single Statement. Thus Requires Considering Of The Way That The Thread Code And Any Arguments Are Provided To The Thread. The Already Loaded Code And Any Defined Variables Within The Main PowerShell Runspace Will Be Not Accessible Within The Isolated One. The Thread Code Can Be Send To The Thread Using "InitializationScript" Parameter Or Imported From A File Within The "InitializationScript". In Case The Thread Is Run On A Remote Machine The Imported Script File Must Be Located On The Remote Machine. The Isolated Remote Runspace Does Not Have Any Network Capabilities, Accessing A Script File Via Network Share Is Not Possible. </para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.ThreadArguments"> <summary> <para type="description">Specifies A Hashtable Collection With The Arguments Which To Be Provided To The Isolated Threads.</para> <para type="description"> The Number Of Input Objects Must Be Either Equal To The Number Of Parallel Jobs Or A Single Hashtable Which Will Be Sent To All Threads. </para> <para type="description">When Omitted No Arguments Will Be Send To The Threads.</para> <para type="description"> An Hashtable With Arguments For A Single Thread Must Be Similar To A Splatting Hashtable, Where The Hashtable Keys Are The Parameter Names, And The HashTable Values Are The Parameter Values. The Parameter Names Must Correspond To The CmdLet Specified In "ThreadCommand" Parameter. </para> <para type="description">For Example:</para> <para type="description">$a = @{ "Name" = "powershell"; "Verbose" = $true; };</para> <para type="description">Invoke-SnsParallelRunSpaces -ThreadCommand "Get-Process" -Identity @(0..49) -Local -ThreadArguments $a;</para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.InitializationScript"> <summary> <para type="description">Specifies A Function Or Script To Be Preloaded Into The Remote Runspace.</para> <para type="description"> Most Often When Multithreading Will Be Need To Be Run Multiple Commands Within The Threads, When Single CmdLet Is Used, It Most Probably Will Require A PowerShell Module To Be Imported. To Make This Possible "InitializationScript" Parameter Comes In Handy, Having In Mind The Limitation Of "ThreadCommand" Parameter To Be Specified A Single CmdLet. All The Thread Code Can Be Provided In An "InitializationScript" In Form Of A Function, And That Function To Be Called In "ThreadCommand" Parameter. This Does Allow Complex Code To Be Run Within Isolated Multiple Threads Including Remote Ones. </para> <para type="description"> The Function Provided To "InitializationScript" Parameter Must Accept The Arguments Provided With "ThreadArguments" Parameter And Revert Any Output That Have To Be Send Back To The Calling PowerShell Runspace. </para> <para type="description">For Example:</para> <para type="description">$initScr = @'</para> <para type="description">Function Get-SnsProcess()</para> <para type="description">{</para> <para type="description">Param( $Name)</para> <para type="description">Write-Information "Write-Information";</para> <para type="description">Write-Warning "Write-Warning";</para> <para type="description">Write-Verbose "Write-Verbose";</para> <para type="description">Write-Host "Write-Host";</para> <para type="description">Write-Error "Write-Error";</para> <para type="description">Import-Module -Name "SnsPsModule";</para> <para type="description">Start-Sleep -Seconds 1;</para> <para type="description">return Get-Process -Name $Name;</para> <para type="description">}</para> <para type="description">'@;</para> <para type="description">$ar = @{ "Name" = "powershell"; };</para> <para type="description">Invoke-SnsParallelRunSpaces -InitializationScript $initScr -ThreadCommand "Get-SnsProcess" `</para> <para type="description">-Identity @(0..29) -Local -ThreadArguments $ar -Verbose;</para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.Identity"> <summary> <para type="description">Specifies Unique Identities Of Each Thread.</para> <para type="description"> Treads Might Complete Faster Than Others In Asynchronous Multi-Threading. The Output Objects Order Depends On The Order Of The Threads Completion, Rather Than The Input Objects Order. Thread Identity Is Used To Identify The Output Of The Threads. </para> <para type="description"> In "Remote" Threads Execution The Thread Identities Must Be The Remote Machine FQDN’s (Fully Qualified Domain Name) Where Each Tread Must Be Run. This Does Allow The Same Peace Of Code To Be Run Remotely On Multiple Machines, And Once Finished The Output From The Threads Is Reverted To The Invoking Machine. Quite Useful Whenever Have To Be Made Health Check On Multiple Machines. </para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.Credential"> <summary> <para type="description">Specifies PSCredential Object For Each Remote Thread.</para> <para type="description"> The Credential Object Must Belong To An Account With Local/Domain Administrator Access Rights On The Remote Machine. </para> <para type="description">If Omitted The Remote Threads Will Be Run Under Current User Security Context.</para> <para type="description"> The Parameter Accepts Either Single Credential Object Used For All Of The Threads, Or Multiple Credential Objects Corresponding To Each Of The Threads. </para> <para type="description"> Specifying Credential Objects Which Do Not Correspond To The Specified Thread Identities Will Lead To Terminating Errors. </para> <para type="description"> It Is Recommended The Credential Objects To Be Tested In Advance, Especially In The Cases Where Single Credential Object Is Used And The Number Of Threads Is Above The "Account Lockout Threshold". In That Case Running The Command With Wrong Credentials Guarantee The Account Lockout. </para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.MaxDuration"> <summary> <para type="description">Specifies A Threshold For Maximum Running Time Of The Remote Threads In Minutes.</para> <para type="description">At The End Of The Period All Not Completed Threads Are Forcefully Terminated And Output Is Not Reverted.</para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.MaxThreads"> <summary> <para type="description"> Specifies A Threshold About Maximum Number Of Running Threads At Any Given Time. The Threads Above The Threshold Will Wait Previous Threads To Complete. </para> <para type="description"> When Omitted The CmdLet Will Automatically Assign Threshold Based On The Number Of CPU Cores On The Machine. The Automatically Assigned Threshold Is Displayed In The Verbose Stream. </para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.Local"> <summary> <para type="description">Specifies To The CmdLet To Run The Threads Locally.</para> </summary> </member> <member name="P:SnsPsModule.InvokeSnsParallelRunSpaces.Remote"> <summary> <para type="description">Specifies To The CmdLet To Run The Threads On Remote Machines.</para> </summary> </member> <member name="T:SnsPsModule.GetSnsWebPage"> <summary> <para type="synopsis">Extracts HTML Content From A Web Page As A String.</para> <para type="description">Extracts HTML Content From A Web Page As A String.</para> <para type="description"> The Main Reason This Command-Let To Be Developed Is The Fact That Invoke-WebRequest Native PowerShell Command Is Running Within Own Run Space Which Does Not Inherit The Parent Run Space Settings. Invoke-WebRequest Command Does Not Have Parameters To Skip The Certificates Checks Before PowerShell 6.0. With Other Words On Machines With PowerShell Before 6.0 Without External Internet Access On HTTP Protocol Cannot Be Verified The Revocation Lists Of The HTTPS Certificates. </para> <para type="description"> The Get-WebPage Command-Let Can Connect To Web Pages With Or Without Authentication. In Order This To Be Possible The Command-Let Was Developed With 3 ParameterSets. </para> <para type="description"> --ParameterSet "Anonymous" - This ParameterSet Is Used For Webpage Which Does Not Require Authentication. The User Will Need To Provide Only The WebPage URL. </para> <para type="description"> --ParameterSet "Credential" - In This ParameterSet The User Have To Provide WebPage URL, A Valid PSCredential Object, Login URL, The Name Of The UserName And Password Textboxes As They Are Named In The Login Form Of The Destination WebPage. </para> <para type="description"> --ParameterSet "UserAndPass" - In This ParameterSet The User Have To Provide WebPage URL, UserName, Password In Clear Text, Login URL, The Name Of The UserName And Password Textboxes As They Are Named In The Login Form Of The Destination WebPage. Providing The Password In Clear Text Is Not A Security Concern As It Is Not Stored Anywhere On The Computer. The Password Is Kept Into The Computer Memory For The Duration Of The Command Run And Then Is Destroyed. However Usage In That Parameter Set In Scripts Can Be Security Concern As Long As The Password Have To Be Sored Unencrypted Somewhere And Provided To The Command-Let. </para> <para type="description"> At The Very Beginning The Command-Let Connects To The Provided LoginUrl And Extracts From There An Access Cookie Which Is Used Afterward To Be Accessed The WebPage URL. The Access Cookie Is Preserved In The Computers Memory For The Duration Of The Command-Let Run And Can Be Used For Accessing Of Multiple Pages That Can Accept This Cookie, As Long As The WebPage URL's Are Provided As Collection. The Output Strings Collection Is Reverted In The Same Order As The Webpage URL's Are Provided. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.String[]]$strHtml = Get-SnsWebPage -Url "https://contoso.com"; </code> <para> Gets Web Page HTML From A WebPage Without Logon. </para> <para></para> </example> <example> <code> [System.String[]]$strHtml = Get-SnsWebPage -Credential (Get-Credential) -FormUserNameField "username" ` -FormPasswordField "password" -LoginUrl "https://contoso.com/dologin.action" -Url "https://contoso.com"; </code> <para> Gets Web Page HTML Using Credentials Which Have To Be Provided By The User. </para> <para> To Get The Form TextBox Names Have To Be Checked In Advance The Source Of The Logon Page With Some Browser. </para> <para></para> </example> <example> <code> [System.String[]]$strHtml = Get-SnsWebPage -UserName "CONTOSO\JohnSmith" -FormUserNameField "username" ` -Password "Pa$$w0rd" -FormPasswordField "password" -LoginUrl "https://contoso.com/dologin.action" ` -Url "https://contoso.com"; </code> <para> Gets Web Page HTML Using Specified UserName And Password. </para> <para> To Get The Form TextBox Names Have To Be Checked In Advance The Source Of The Logon Page With Some Browser. </para> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.GetSnsWebPage.Url"> <summary> <para type="description">Specifies The WebPage Universal Resource Locator.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.Anonymous"> <summary> <para type="description">Specifies That The WebPage Does Not Require Authentication And Shall Be Accessed Directly.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.LoginUrl"> <summary> <para type="description">Specifies The WebPage LoginUrl.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.FormUserNameField"> <summary> <para type="description">Specifies The WebPage Username Textbox Name As It Is Named In The Login Page Form.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.FormPasswordField"> <summary> <para type="description">Specifies The WebPage Password Textbox Name As It Is Named In The Login Page Form.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.Credential"> <summary> <para type="description">Specifies The WebPage Credential Object.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.UserName"> <summary> <para type="description">Specifies The WebPage Username In Clear Text.</para> </summary> </member> <member name="P:SnsPsModule.GetSnsWebPage.Password"> <summary> <para type="description">Specifies The WebPage Password In Clear Text.</para> </summary> </member> <member name="T:SnsPsModule.MoveSnsAdObject"> <summary> <para type="synopsis">Moves The Specified AD Object Into Specified AD Parent Container.</para> <para type="description">Moves The Specified AD Object Into Specified AD Parent Container.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdMoveObject]$objResult = Move-SnsAdObject -DomainController "DC01.contoso.com" ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" -Destination "OU=Disabled Users,DC=contoso,DC=com"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.MoveSnsAdObject.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.MoveSnsAdObject.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.MoveSnsAdObject.Destination"> <summary> <para type="description">Specifies The Identity Of The Of The Destination Active Directory Parent Container.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.MoveSnsAdObject.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.NewSnsAdObject"> <summary> <para type="synopsis">Creates Active Directory Objects.</para> <para type="description">The CmdLet Can Create:</para> <para type="description">-- Active Directory Account.</para> <para type="description">-- Active Directory Group.</para> <para type="description">-- Active Directory Contact.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdNewObject]$objResult = New-SnsAdObject ` -FirstName "John" -LastName "Smith" -OU "OU=Users,DC=contoso,DC=com"; </code> <para> Creates AD Account With Name "John Smith" Inside OU "Users" With sAMAccountName "John.Smith", DisplayName "John Smith", FirstName "John" And LastName "Smith". </para> <para></para> </example> <example> <code> [SnsPsModule.SnsAdNewObject]$objResult = New-SnsAdObject -AdGroup ` -OU "OU=Groups,DC=contoso,DC=com" -Name "Accountants" -GroupScope "Universal" -GroupType "Distribution"; </code> <para>Creates Universal Distribution Group In OU "Groups" (Not MailEnabled).</para> <para></para> </example> <example> <code> [SnsPsModule.SnsAdNewObject]$objResult = New-SnsAdObject -AdContact ` -FirstName "John" -LastName "Smith" -OU "OU=Contacts,DC=contoso,DC=com"; </code> <para>Creates AD Contact In OU "Contacts" (Not MailEnabled).</para> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsAdObject.OU"> <summary> <para type="description">Specifies The Identity Of The Of The New Object AD Parent Container.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.AdAccount"> <summary> <para type="description">Specifies To Be Created An AD User Account.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.AdGroup"> <summary> <para type="description">Specifies To Be Created An AD Group.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.AdContact"> <summary> <para type="description">Specifies To Be Created An AD Contact.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.Name"> <summary> <para type="description">Specifies The Name Of The New AD Object.</para> <para type="description"> If Omitted Will Be Used The Value For The DisplayName No Matter Whether It Is Specified Or Autogenerated. From The DisplayName Value Are Removed All Invalid Characters. </para> <para type="description">For Valid Characters Are Considered:</para> <para type="description">-- All English Alphabet Characters Capital And Lower</para> <para type="description">-- All Numeric Characters</para> <para type="description">-- Space ( )</para> <para type="description">-- Dash (-)</para> <para type="description">-- Underscore (_)</para> <para type="description">-- Comma (,)</para> <para type="description">-- Apostrophe (')</para> <para type="description">-- Dot (.)</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.SamAccountName"> <summary> <para type="description">Specifies The sAMAccountName Of The New AD Object.</para> <para type="description"> The sAMAccountName For The AD Accounts Is Mandatory. If The Parameter Is Omitted The CmdLet Will Autogenerate It Using Name Parameter Value Replacing The Spaces With Dot (.). In Case The Autogenerated Value Is Longer Than 20 Characters Will Be Used Only The First 20 Ones. </para> <para type="description"> The sAMAccountName For The AD Groups Is Not Mandatory. If The Parameter Is Omitted The CmdLet Will Autogenerate It Using Name Parameter Value. In Case The Autogenerated Value Is Longer Than 20 Characters Will Be Used Only The First 20 Ones. </para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.UserPrincipalName"> <summary> <para type="description">Specifies The UserPrincipalName (UPN) Of The New AD Account.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.Password"> <summary> <para type="description">Specifies A Password To Be Set To The New AD Account.</para> <para type="description">If Omitted The CmdLet Will Set Random Password.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.DisplayName"> <summary> <para type="description">Specifies The DisplayName Of The New AD Object.</para> <para type="description"> If Omitted And Whenever Is Applicable The DisplayName Will Be Autogenerated Via Concatenation Of The Specified FirstName And LastName. </para> <para type="description"> If Still Without Value, "DisplayName" Will Be Set, With The Value Provided In "Name" Parameter. </para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.FirstName"> <summary> <para type="description">Specifies The FirstName Of The New AD Account Or Contact.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.LastName"> <summary> <para type="description">Specifies The LastName Of The New AD Account Or Contact.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.Manager"> <summary> <para type="description">Specifies The Manager / ManagedBy Of The New AD Object.</para> <para type="description">As Manager / ManagedBy Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.GroupScope"> <summary> <para type="description">Specifies The GroupScope Of The New AD Group.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.GroupType"> <summary> <para type="description">Specifies The GroupType Of The New AD Group.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.NewSnsAdObject.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.NewSnsChart"> <summary> <para type="synopsis"> This CmdLet Creates A Chart Object Based On The Specified Statistical Or Raw Data And Exports It On A File. </para> <para type="description"> This CmdLet Creates A Chart Object Based On The Specified Statistical Or Raw Data And Exports It On A File. </para> <para type="description"> PowerShell Is A Scripting Language And It Does Not Need To Have Any Kind Of Forms, And Objects Used Within Forms As The Command Need No Graphical Interface. The PowerShell Is Intended To Be Used As A Language For Writing Of Automation Scripts. Sometime Those Automation Scripts Produce Reports Which Need To Be Sent On Emails. If The Reports Needs To Be Provided To Other System That Visualize The Output Is Better The Data To Be Inserted In A DataBase And The Other systems To Access The Data From There Or To Be Exported On .CSV Files And Provided To Those Systems. Whenever The Reports Data Have To Be Send On Humans Over Emails Or Some Other Channels Is Better The Data To Be Presented In Charts Than To Be Provided Data On .CSV Files Which Are Not Human Friendly. Here Comes The Need Of This CmdLet To Present Information On Human Friendly Way In Form Of Charts And Exports Those Charts On Common Recognizable Picture Formats, So They To Be Easily Embedded Into Emails, Webpages And etc. The .NET Chart Objects Normally Can Be Used Within Graphical In Interface Forms. </para> <para type="description"> The CmdLet Has Two Parameter Sets: </para> <para type="description"> Parameter Set "InputObject": In This Parameter Set The CmdLet Requires To Be Specified Already Processed Statistical Data And The CmdLet Will Prepare Only The Chart Visualization. The Input Objects Have To Be From Type PSObject Or PSCustomObject, Where The Property Names Have To Be The Values In The AxisX And The Values Within Those Properties Have To Be The AxisY Values. The CmdLet Requires The AxisY Values To Be From Type Double Or To Be Possible Explicit Casting To Type Double. If You Are Running The CmdLet In PowerShell 5 And Above, The Input Tables Can Be HashTables And The PowerShell Natively Will Convert Them To PSObject Type. However The HashTables Do Not Keep Track Of The Pairs Order Which Might Lead To Unexpected Results As For Example The Dots On AxisX To Be Not Properly Ordered. In This Parameter Set The User Have Greater Control On The Chart Visualization. For More Details Refer To Parameters Section Of This Document. </para> <para type="description"> Parameter Set "RawData": In This Parameter The CmdLet Will Require A Collection Of Type PSObject Or PSCustomObject With The RawData Which Have To Be Analyzed. The CmdLet Have Basic Analyze Functionalities. In This Parameter Set The CmdLet Will Require To Be Specified The Column In The RawData Which Have The Values That Identifies The Data Series (The Lines In The Chart), To Be Specified The Column Which Identifies The AxisX Values, And The Column That Will Be Used To Calculate The AxisY Values. It Might Sound Complicated But Giving An Example Will Clarify It. For Example If We Have A Collection With Objects That Have Properties "Severity", "Date" And "Message" We Can Specify To The CmdLet To Use The Column "Severity" As "SeriesColumn" Which Will Make Different Series (Lines Or Bar Series) For Each Value Present In The Column "Severity". For Example A Line For "Information Event" A Line For "Warning" And A Line For "Error". Then We Specify The Property / Column "Date" As "AxisXColumn" And The Produced Chart Will Have Bars Or Dots In A Line For Each Of The Dates Present In The "Date" Column. Then We Specify The Property / Column "Message" As "AxisYColumn" And The CmdLet Will Make Lines / Bars For With The Counts Of Information, Warning And Error Events For Each Date. The CmdLet Can Only Count The Occurrences Of The Values In The Specified Column "Messages". Whenever Average, Total Or Some Other Statistical Processing Is Needed The, Processing Have To Happen Outside The CmdLet And The Processed Data Have To Be Provided With "InputObject" Parameter Set. </para> <para type="description"> The "RawData" Parameter Set Is Limited From Visualization Options. For Example As The Data Series Are Taken From A Column In The Raw Data. The Colors for The Data Series Cannot Be Specified By The User. Normally The User Have To Analyze The Data To Identify The Data Series And To Specify Color For Each Data Serie. Which Makes No Sense To Leave The CmdLet To Analyze The Data. From That Perspective Other Than Automatic Color Generation Is Pointless In "RawData" Parameter Set, Because Without Analyze In Advance Is Not Clear The Number Of Series, Therefore The Number Of Colors That Are Needed. More Over It Might Happen That Some Of The Series Are Not Present Within The RawData, And Their Series To Be Not Created. For Example It Might Happen The Raw Data To Not Have Any "Error" Events Which Will Create A Chart Without Line For The Errors, Then The Specified Colors Will Not Match The Number Of Data Series. For More Details About Which Visualization Options Are Available In "RawData" Parameter Set Please Refer To Parameter Section Of This Document. </para> <list type="alertSet"> <item> <term> Warning </term> <description> <para> Whenever The Values In AxisX Are System.DateTime Objects The User Have To Pay Extra Attention As Unexpected Results Might Be Produced, Because Of The Precision Of The Struct. For Example Wanted Chart With Type Column And Columns Per Day, And The Produced Chart To Have Columns For Each Millisecond With Height 1. In That Case The Raw Data Have To Be Modified In Advance In A Way So The Values In AxisX To Be Grouped As Per The Desired Output. For Example If The Chart Have To Present The Data Per Day, The Information About The Hours, Minutes, Seconds And etc. Have To Be Stripped Out From The Date Column. </para> <para></para> <para></para> <para></para> </description> </item> <item> <term> AUTHOR </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> $arrInput | New-SnsChart -Path 'C:\Cha.png' -ChartType "Column" -AxisXTitle "Date" -AxisYTitle "Events Number" ` -LegendTitle "Event Severity" -SeriesColor @("Green", "Yellow", "Red") -Title "Events Per Date" ` -SeriesTitle @("Information Events", "Warning Events", "Error Events"); </code> <para></para> </example> <example> <code> New-SnsChart -Path 'C:\Cha.jpg' -ChartType "Column" -RawData $rrInput -AxisXColumn "Date" -AxisYColumn "Message" ` -SeriesColumn "Severity" -AxisXTitle "Date" -AxisYTitle "Events Number" -LegendTitle "Event Severity" -Enable3D ` -Title "Events Per Date"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsChart.Path"> <summary> <para type="description">Specifies The File Where The Chart Will Be Exported.</para> <para type="description">The File Extension Must Be Either ".png" Or ".jpg".</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.Title"> <summary> <para type="description">Specifies The Chart Title.</para> <para type="description">If Omitted The Chart Will Have No Title.</para> <para type="description">And The Chart Area Will Expand To The High Of The File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.LegendTitle"> <summary> <para type="description">Specifies Legend Title.</para> <para type="description">If Omitted The Chart Legend Will Be Not Created.</para> <para type="description">And The Chart Area Will Expand To The Width Of The File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.AxisXTitle"> <summary> <para type="description">Specifies Axis "X" Title.</para> <para type="description">Axis "X" Is The Horizontal Axis.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.AxisYTitle"> <summary> <para type="description">Specifies Axis "Y" Title.</para> <para type="description">Axis "Y" Is The Vertical Axis.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.Enable3D"> <summary> <para type="description">Specifies To Create 3 Dimensional Chart.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.AddTotal"> <summary> <para type="description">Specifies To Add Sum Of The Serie Value In The Serie Entry Into The Chart Legend.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.ChartType"> <summary> <para type="description">Specifies Chart Type.</para> <para type="description">Allowed Chart Types Are:</para> <para type="description"> "Column", "RangeColumn", "StackedColumn", "Bar", "RangeBar", "StackedBar", "Line", "FastLine", "StepLine", "Spline", "SplineRange", "Area", "SplineArea", "StackedArea", "Range" </para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.PassThru"> <summary> <para type="description">Specifies To The CmdLet To Revert A String Object.</para> <para type="description">The Reverted String Is The Full Absolute UNC File Path To The Created Picture File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.InputObject"> <summary> <para type="description">Specifies Data Series Which Have To Be Visualized.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.SeriesTitle"> <summary> <para type="description">Specifies Titles Of The Specified Data Series.</para> <para type="description">When Specified The Number And Order Of Titles Must Match The Number And Order Of The Input Objects.</para> <para type="description">If Omitted The Chart Legend Will Be Not Created.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.Colors"> <summary> <para type="description">Specifies Colors Of The Series.</para> <para type="description">When Specified The Number And Order Of Colors Must Match The Number And Order Of The Input Objects.</para> <para type="description">The Named Colors Can Be Specified By Their Name.</para> <para type="description">For More Details: https://bit.ly/2LDgXSw </para> <para type="description">If Omitted Will Be Used Random Colors From Bright Pastel Palette.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.RawData"> <summary> <para type="description">Specifies The RawData Which Have To Be Analized And Visualized.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.SeriesColumn"> <summary> <para type="description">Specifies A Column Name Within The RawData Which Identifies The Data Series.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.AxisXColumn"> <summary> <para type="description">Specifies A Column Name Within The RawData Which Identifies The AxisX Values.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsChart.AxisYColumn"> <summary> <para type="description"> Specifies A Column Within The RawData Which Identifies The Values Which Have To Be Analyzed / Counted And Output Set As AxisY Values. </para> <para type="description">Normally That Would Be A Non Nullable Column Or The Objects Unique Identity / Primary Key.</para> </summary> </member> <member name="T:SnsPsModule.NewSnsHtmlHeader"> <summary> <para type="synopsis">Creates XHTML 1.0 Strict Web Page Header And CSS3 Template.</para> <para type="description">Creates XHTML 1.0 Strict Web Page Header And CSS3 Template.</para> <para type="description"> Depending Of The Specified Parameters HTML Document Declaration Is Made As C# ASP.NET XHTML 1.0 Strict Document Or Normal XHTML 1.0 Strict HTML Document. </para> <para type="description"> In The HTML Header Section Are Prepared Place Holder Sections About ASP.NET C# Code Behind And JavaScript Functions Depending Of The Specified Parameters. </para> <para type="description"> The Paragraph Style With Class "Mail" Mimic Exactly The Outlook Font Size And Color For Replying And Forwarding Of Email Messages. </para> <para type="description"> The CmdLet Have Aliases CreateHtmlHeader And Create-HtmlHeader. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.String]$strMessageBody = New-SnsHtmlHeader -ScriptName "$($Configuration.ScriptName)"; </code> <para></para> </example> <example> <code> [System.String]$strMessageBody = New-SnsHtmlHeader -ScriptName "$($Configuration.ScriptName)" ` -CssLink "Styles.css" -CssFilePath "C:\inetpub\wwwroot\Styles.css" </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.ScriptName"> <summary> <para type="description">Specifies A Script Name.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.Author"> <summary> <para type="description">Specifies Author Of The HTML Document.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.Doctype"> <summary> <para type="description">Specifies HTML Doctype.</para> <para type="description">Values: "XHTML1.0Strict", "HTML4.01Strict" And "XHTML1.0Transitional".</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.AutoRefresh"> <summary> <para type="description">Specifies The HTML AutoRefresh Time Interval In Seconds.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.CssFilePath"> <summary> <para type="description">Specifies To The CmdLet To Export The CSS3 Style On A File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.CssLink"> <summary> <para type="description">Specifies To The CmdLet To Create A Link To The External CSS3 Style File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.InnerCss"> <summary> <para type="description">Specifies To The CmdLet To Include The CSS3 Style Inside The HTML Document Header.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.UsingAspx"> <summary> <para type="description">Specifies To The CmdLet To Declare The Web Document As C# ASP.NET One And Insert C# Code Behind Place Holder.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.UsingJavaScript"> <summary> <para type="description">Specifies To The CmdLet To Insert JavaScript Place Holder.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.AdditionalStyle"> <summary> <para type="description">Specifies To The CmdLet Any Additional CSS3 Style.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.CascadeTableRows"> <summary> <para type="description">Specifies To Make Table Rows In Different Color Zebra Like.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.MouseHover"> <summary> <para type="description">Specifies To Table Cells To Change Their Color On Mouse Hover.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.RedEmail"> <summary> <para type="description">Specifies To Be Changed The Background Color And Font Color To Red Ones.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsHtmlHeader.LinksInheritStyle"> <summary> <para type="description">Specifies To Format The Links In Way To Inherit The Stile From Their Parent In Order To Look Like Regular Text.</para> </summary> </member> <member name="T:SnsPsModule.NewSnsPassword"> <summary> <para type="synopsis">Command Line Random Password Generator.</para> <para type="description">Command Line Random Password Generator.</para> <para type="description"> The Password Generators Available In Internet Does Not Have Command Line Interface. Scripts Related With User Provisioning Needs Command Line Interface To Generate Passwords. It Is Required To Avoid Setting A Generic Passwords To The New Users. Generic Passwords Approach Definitely Will Lead To Situation When All The Users Will Know The Generic Password And Might Log With The New Users Accounts. Using Password Generator Will Ensure That Each New User Have Unique Password. </para> <para type="description">The Generated Password Meets The Following Requirements:</para> <para type="description"> - At Least One Random Special Character At Random Position - The List With The Special Characters Is Generated Using The Special Characters Available In US Keyboard Layout. </para> <para type="description">- At Least One Random Digit At Random Position.</para> <para type="description">- At Least One Random English Lower Letter At Random Position.</para> <para type="description"> - At Least One Random English Capital Letter At Random Position - Except "O" and "I" To Be Not Mistaken Respectively With "0" And Lower "L". </para> <para type="description">- The Remaining Characters Are Generated Random From The Lists From Above.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.String]$Password = New-SnsPassword -PasswordLength 15; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsPassword.PasswordLength"> <summary> <para type="description">Specifies The Required Password Length.</para> <para type="description">If Omitted The CmdLet Will Generate Password With Length 20 Characters.</para> <para type="description">If Specified Value Less Than 5 It Will Be Ignored.</para> </summary> </member> <member name="T:SnsPsModule.NewSnsPieChart"> <summary> <para type="synopsis">Creates A Chart Based On The Specified Statistical Or Raw Data And Exports It On A File.</para> <para type="description">Creates A Chart Based On The Specified Statistical Or Raw Data And Exports It On A File.</para> <para type="description"> PowerShell Is A Scripting Language And It Does Not Need To Have Any Kind Of Forms, And Objects Used Within Forms As The Command Need No Graphical Interface. The PowerShell Is Intended To Be Used As A Language For Writing Of Automation Scripts. Sometimes Those Automation Scripts Produce Reports Which Need To Be Sent On Emails. If The Reports Needs To Be Provided To Other Systems That Visualize The Output Is Better The Data To Be Inserted In A DataBase And The Other Systems To Access The Data From There Or To Be Exported On .CSV Files And Provided To Those Systems. Whenever The Reports Data Have To Be Send On Humans Over Emails Or Some Other Channels Is Better The Data To Be Presented In Charts Than To Be Provided Data On .CSV Files Which Are Not Human Friendly. Here Comes The Need Of This CmdLet To Present Information On Human Friendly Way In Form Of Charts And Exports Those Charts On Common Recognizable Picture Formats, So They To Be Easily Embedded Into Emails, Webpages And etc. The .NET Chart Objects Normally Can Be Used Within Graphical Interface Forms And Are Not Available Natively In PowerShell. </para> <para type="description">The CmdLet Has Two Parameter Sets:</para> <para type="description"> Parameter Set "InputObject": In This Parameter Set The CmdLet Requires To Be Specified Already Processed Statistical Data And The CmdLet Will Prepare Only The Chart Visualization. The Input Objects Have To Be From Type PSObject Or PSCustomObject, Where The Property Names Have To Be The Values In The AxisX And The Values Within Those Properties Have To Be The AxisY Values. The CmdLet Requires The AxisY Values To Be From Type Double Or To Be Possible Explicit Casting To Type Double. If You Are Running The CmdLet In PowerShell 5 And Above, The Input Tables Can Be HashTables And The PowerShell Natively Will Convert Them To PSObject Type. However The HashTables Do Not Keep Track Of The Pairs Order Which Might Lead To Unexpected Results As For Example The Dots On AxisX To Be Not Properly Ordered. In This Parameter Set The User Have Greater Control On The Chart Visualization. For More Details Refer To Parameters Section Of This Document. </para> <para type="description"> Parameter Set "RawData": In This Parameter Set The CmdLet Will Require A Collection Of Type PSObject Or PSCustomObject With The RawData Which Have To Be Analyzed. The CmdLet Have Basic Analyze Functionalities. In This Parameter Set The CmdLet Will Require To Be Specified The Column In The RawData Which Have The Values That Identifies The Data Series (The Segments In The Chart), And The Column That Will Be Used To Calculate The AxisY Values. </para> <para type="description"> The "RawData" Parameter Set Is Limited From Visualization Options. For Example As The Data Series Are Taken From A Column In The Raw Data. The Colors for The Data Series Cannot Be Specified By The User. Normally The User Have To Analyze The Data To Identify The Data Series And To Specify Color For Each Data Serie. Which Makes No Sense To Leave The CmdLet To Analyze The Data. From That Perspective Other Than Automatic Color Generation Is Pointless In "RawData" Parameter Set. For More Details About Which Visualization Options Are Available In "RawData" Parameter Set Please Refer To Parameter Section Of This Document. </para> <list type="alertSet"> <item> <term> Warning </term> <description> <para> Whenever The Values In AxisX Are System.DateTime Objects The User Have To Pay Extra Attention As Unexpected Results Might Be Produced, Because Of The Precision Of The Struct. For Example The Produced Chart To Have Segments For Each Millisecond. In That Case The Raw Data Have To Be Modified In Advance In A Way So The Values In AxisX To Be Grouped As Per The Desired Output. For Example If The Chart Have To Present The Data Per Day, The Information About The Hours, Minutes, Seconds And etc. Must Be Stripped Out From The Date Column. </para> <para></para> <para></para> <para></para> </description> </item> <item> <term> AUTHOR </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> $rrInput | New-SnsPieChart -Path 'C:\Chart.png' -Title "Actions" -LegendTitle "Completed Actions" -Enable3D ` -AddYValue -ShowPercent -PassThru -EntryColor @("Green", "Yellow", "Red")"; </code> <para></para> </example> <example> <code> New-SnsPieChart -Path 'C:\Chart.jpg' -Title "Actions" -LegendTitle "Completed Actions" -Enable3D -AddYValue ` -ShowPercent -PassThru -RawData $rrInput -AxisXColumn "Message" -AxisYColumn "Date"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsPieChart.Path"> <summary> <para type="description">Specifies The File Where The Chart Will Be Exported.</para> <para type="description">The File Extension Must Be Either ".png" Or ".jpg".</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.Title"> <summary> <para type="description">Specifies The Chart Title.</para> <para type="description">If Omitted The Chart Will Have No Title.</para> <para type="description">And The Chart Area Will Expand To The High Of The File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.LegendTitle"> <summary> <para type="description">Specifies Legend Title.</para> <para type="description">If Omitted The Chart Legend Will Be Not Created.</para> <para type="description">And The Chart Area Will Expand To The Width Of The File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.Enable3D"> <summary> <para type="description">Specifies To Create 3 Dimensional Chart.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.AddYValue"> <summary> <para type="description">Specifies To Add The Y Values To The Serie Entry In The Chart Legend.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.ShowPercent"> <summary> <para type="description">Specifies To Display The Percentage As Text In The Chart Area.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.PassThru"> <summary> <para type="description">Specifies To The CmdLet To Revert A String Object.</para> <para type="description">The Reverted String Is The Full Absolute UNC File Path To The Created Picture File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.InputObject"> <summary> <para type="description">Specifies Data Serie Which Have To Be Visualized.</para> <para type="description">It Can Be Only One Serie Because Of The Pie Chart Specific.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.Colors"> <summary> <para type="description">Specifies Colors Of The Segments In The Pie Chart.</para> <para type="description">When Specified The Number And Order Of Colors Must Match The Number And Order Of The InputObject Properties.</para> <para type="description">The Named Colors Can Be Specified By Their Name.</para> <para type="description">For More Details: https://bit.ly/2LDgXSw </para> <para type="description">If Omitted Will Be Used Random Colors From Bright Pastel Palette.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.RawData"> <summary> <para type="description">Specifies The RawData Which Have To Be Analyzed And Visualized.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.AxisXColumn"> <summary> <para type="description">Specifies A Column Within The RawData Which Identifies The AxisX Values.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsPieChart.AxisYColumn"> <summary> <para type="description"> Specifies A Column Within The RawData Which Identifies The Values Which Have To Be Analyzed / Counted And Output Set As AxisY Values. </para> </summary> </member> <member name="T:SnsPsModule.NewSnsZipArchive"> <summary> <para type="synopsis">Provides Command Line Interface (CLI) To The Built Into MS Windows ZIP Functionality.</para> <para type="description">Provides Command Line Interface (CLI) To The Built Into MS Windows ZIP Functionality.</para> <para type="description"> Installing Of 3rd Party Archiving Applications And Assigning ZIP File Extension To Them Might Disable The Built Into MS Windows Archiving Functionality Irreversibly. This Will Cause This CmdLet To Stop Working. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.String[]]$arrZipName = New-SnsZipArchive -Path 'C:\New folder'; </code> <para></para> </example> <example> <code> [System.String[]]$arrZipName = New-SnsZipArchive -Path 'C:\Test1txt', 'C:\Test1txt'; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.NewSnsZipArchive.Path"> <summary> <para type="description">Specifies The Full Absolute UNC File Or Folder Path.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsZipArchive.PassThru"> <summary> <para type="description">Specifies To The CmdLet To Revert A String Object.</para> <para type="description">The Reverted Object Is The Full Absolute UNC File Path To The Created ZIP File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsZipArchive.Force"> <summary> <para type="description">Specifies To The CmdLet To Force Overwrite Of Any Existing ZIP File.</para> </summary> </member> <member name="P:SnsPsModule.NewSnsZipArchive.Keep"> <summary> <para type="description">Specifies To The CmdLet To Preserve The Original Item.</para> <para type="description">Copy The Item Inside The ZIP File Instead Of Moving It.</para> </summary> </member> <member name="T:SnsPsModule.RemoveSnsAdGroupMember"> <summary> <para type="synopsis">Removes The Specified AD Group Members From The Specified AD Group.</para> <para type="description">Removes The Specified AD Group Members From The Specified AD Group.</para> <para type="description"> Within Active Directory Exists A Threshold Related With The Number Of Values That Can Be Retrieved From A Single Attribute. That Threshold Depends From The Domain And The Forest Functional Level At The Time When The First Domain Controller Was Promoted. With The Consequent Elevation Of The Domain And The Forest Functional Level The Threshold Remains Intact And Not Modified. </para> <para type="description"> In Order To Avoid That Limitation Whenever A Group Contains Large Number Of Members, The CmdLet Performs The Verification Via Evaluating The Members "memberOf" Attribute. Although It Is Multivalued Attribute As Well And Is Affected By The Same Limitation, The Possibility A User To Be Member Of That Many Groups Is Not Likely. Moreover The Users Access Token Will Break Because Of The Large Number Of Groups Long Before The Limitation About Number Of Displayed Values To Be Reached. For Example For The Forests Initially Built With Windows 2000 The Limitation Is 1000. So It Is Likely To Have Groups With More Than 1000 Members, But It Is Not Likely To Have A User Member Of That Many Groups. </para> <para type="description"> Verification Of The Groups Members Removal Via Evaluation Of The Removed Object "memberOf" Attribute Introduce Some Limitations As Well. The CmdLet Needs To Perform More Queries Against The Active Directory And Need To Handle More Data, Which Means That From Performance Perspective It Is Slower In Relation With The Other CmdLets. Additionally The Verification Might Not Work As Expected Whenever A User From One Domain In A Forest Is Removed From A Group Located In Different Domain In The Same Forest. </para> <para type="description"> In The Cases When Is Need To Manage The Group Membership Of Groups With Small Number Of Members Is Preferable To Be Used "Remove-SnsAdMultiValuedStringAttributeValue" CmdLet Against The Group Object And Attribute "member". This Applies As Well For The Scenarios Whenever The Removed Member Is From Different Domain Than The Managed Group. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdGroupMember]$objResult = Remove-SnsAdGroupMember ` -GroupIdentity "CN=Group01,OU=Groups,DC=contoso,DC=com" ` -MemberIdentity "CN=John Smith,OU=Users,DC=contoso,DC=com"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.RemoveSnsAdGroupMember.MemberIdentity"> <summary> <para type="description">Specifies The Identity Of An AD Object To Be Removed As Member From The Specified Group.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> <para type="description"> Whenever The CmdLet Will Be Used To Add Multiple User Accounts From Different AD Domains In Multi Domain Forest Must Be Used "AdsPath" With Included Domain Controller From The Corresponding Domain Where The Specified Domain Object Is Located. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdGroupMember.GroupIdentity"> <summary> <para type="description">Specifies The Identity Of AD Group To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdGroupMember.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdGroupMember.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue"> <summary> <para type="synopsis">Removes The Specified Values From AD Object Multi Valued Attribute Preserving The Remaining Ones.</para> <para type="description">Removes The Specified Values From AD Object Multi Valued Attribute Preserving The Remaining Ones.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdMultiValuedString]$objResult = Remove-SnsAdMultiValuedStringAttributeValue ` -Identity "CN=Group01,OU=Groups,DC=contoso,DC=com" -Attribute "msExchExtensionCustomAttribute1" ` -Value "TestValue"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> <para type="description"> Although The CmdLet Can Be Used To Remove Values From Any Multi Valued String Attribute. It Is Not Good Idea To Be Used For Removing Of Group Members. The Active Directory Have A Limitation Related With The Reverted Number Of Values Within An Attribute. Therefore If The Group Members Are Above The Threshold The Removal Verification Will Be Always True Even If The CmdLet Fail Because The Member Might Not Be Among The Reverted Results. For That Purpose Is Preferable To Be Used The CmdLets With Noun SnsAdGroupMember From This Module. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue.Value"> <summary> <para type="description">Specifies The Members Which Have To Be Removed From The Specified Attribute.</para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdMultiValuedStringAttributeValue.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.RemoveSnsAdObject"> <summary> <para type="synopsis">Deletes Specified Active Directory Object.</para> <para type="description">Deletes Specified Active Directory Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsRemoveAdObject]$objResult = Remove-SnsAdObject ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" -DomainController "DC01.contoso.com"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.RemoveSnsAdObject.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdObject.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdObject.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="P:SnsPsModule.RemoveSnsAdObject.Force"> <summary> <para type="description">Removes "Protect object from accidental deletion" Flag Before The Object Deletion.</para> </summary> </member> <member name="T:SnsPsModule.RenameSnsAdObject"> <summary> <para type="synopsis">This CmdLet Renames Specified AD Object With Specified NewName.</para> <para type="description">This CmdLet Renames Specified AD Object With Specified NewName.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsRenameAdObject]$objResult = Rename-SnsAdObject ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -DomainController "DC01.contoso.com" -NewName "John Maynard Smith"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.RenameSnsAdObject.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Renamed.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.RenameSnsAdObject.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.RenameSnsAdObject.NewName"> <summary> <para type="description">Specifies The Desired Name Of The Active Directory Object.</para> </summary> </member> <member name="P:SnsPsModule.RenameSnsAdObject.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.ResetSnsAdPassword"> <summary> <para type="synopsis">Resets The Password Of A Specified Active Directory User Account.</para> <para type="description">Resets The Password Of A Specified Active Directory User Account.</para> <para type="description">The CmdLet Have Two Parameter Sets:</para> <para type="description">--Password - In This Parameter Set Have To Be Specified The New Password.</para> <para type="description">--Generate - In This Parameter Set The CmdLet Auto Generates A Password With Specified Length.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdPassReset]$objResult = Reset-SnsAdPassword ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -Password "Pa$$w0rd" -UserMustChangePassword; </code> <para></para> </example> <example> <code> [SnsPsModule.SnsAdPassReset]$objResult = Reset-SnsAdPassword ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -AutoGeneratePasswordWithLength 20 -UserMustChangePassword; </code> <para></para> </example> <example> <code> [SnsPsModule.SnsAdPassReset]$objResult = Reset-SnsAdPassword ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -UserMustChangePassword; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.Password"> <summary> <para type="description">Specifies The Password Which Have To Be Set To The User.</para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.AutoGeneratePasswordWithLength"> <summary> <para type="description">Specifies To Auto Generate A Password With The Specified Length.</para> <para type="description">If Omitted The Autogenerated Password Will Have Length 20 Characters.</para> <para type="description">The Generated Password Will Be Reverted As Property Of The Output Object.</para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.UserMustChangePassword"> <summary> <para type="description">Specifies To Set "User must change password at next logon" Flag.</para> </summary> </member> <member name="P:SnsPsModule.ResetSnsAdPassword.ResetTwice"> <summary> <para type="description">Specifies To Reset The Users Account Password Twice.</para> <para type="description">In Certain Occasions There Is A Need The Password To Be Reset Twice.</para> <para type="description">For Example: https://bit.ly/3HMsU0y </para> <para type="description"> Whenever This Feature Is Used The CmdLet Will Reset The Users Password Once With Randomly Generated Password With Length 256 Characters. Afterward Will Reset The Users Password Again As Per The Specified Parameters. </para> </summary> </member> <member name="T:SnsPsModule.SearchSnsAdObject"> <summary> <para type="synopsis">Performs LDAP Search Against The AD Using .NET ADSI Adapter Provider.</para> <para type="description">Performs LDAP Search Against The AD Using .NET ADSI Adapter Provider.</para> <para type="description">Depending Of The CmdLet Arguments Are Possible 5 Scenarios:</para> <para type="description"> --Scenario 1 - Specified DcSearch Switch Specified Search Root And Specified Domain Controller. The Search Is Performed Against The Domain Partition Of The Specified Domain Controller Using The Default LDAP Ports. The Search Is Restricted To The Specified Organizational Unit Or Container Or Domain. This Is The Most Recommended Scenario For Using Of This CmdLet. </para> <para type="description"> --Scenario 2 - Specified DcSearch Switch Not Specified Search Root And Specified Domain Controller. The Search Is Performed Against The Domain Partition Of The Specified Domain Controller Using The Default LDAP Ports. However Because The Search Root Is Mandatory For .NET The CmdLet Will Assume As A DcSearch Root The Root Of The Logged On Domain And Will Specify It On Users Behalf. This Option Shall Be Used With Extra Care In MultiDomain Forests Where The Logged With In Account Might Be In Different Domain And The Search To Not Revert The Desired Results. </para> <para type="description"> --Scenario 3 - Specified DcSearch Switch Specified Search Root And Not Specified Domain Controller The Search Is Performed Against The Domain Partition Of An Automatically Chosen by .NET Domain Controller Within The Domain Used In The Specified SearchRoot Using The Default LDAP Ports. The Search Is Restricted To The Specified Organizational Unit Or Container Or Domain. Use This Scenario With Extra Care As It Might Lead To Unexpected Results Especially If You Try To Read Recent Changes Not AD Replicated Yet. </para> <para type="description"> --Scenario 4 - Specified DcSearch Switch Not Specified Search Root And Not Specified Domain Controller. Normally This Scenario Is Not Allowed However Because The DcSearch Is Specified The Function Assume That The Search Have To Be Executed Against The Root Of The Currently Logged In Domain And Specify The Domain As SearchRoot On Users Behalf. The Remaining Considerations Are The Same Like The DcSearch Without Specified Domain Controller. </para> <para type="description"> --Scenario 5 - Specified GcSearch Switch Not Specified Search Root And Specified Domain Controller. The Search Is Performed Against The Global Catalog Partition Of The Specified Domain Controller Using The Default Global Catalog Ports. The Search Is Not Restricted To Any Domain Or Organizational Unit Or Container. Use The Global Catalog Search With Extra Care It Looks Very Easy And Obvious Choice But It Might Revert Unexpected Results Especially If The LDAP Query Contains Clauses Related With AD Attributes Not Present In The Global Catalog Partition. Additionally It Does Not Revert Properties Not Present In The Global Catalog Partition Even If They Are Specified This Might Lead To Wrong Impression That Those Properties Are Empty. It Is Always Preferable To Get A List With All The Domains And Domain Controllers Responsible For The Corresponding Domains And Loop The Search Against Each Of Them Instead Using Global Catalog Search. Another Known Issue Is when The Specified Global Catalog Server For The LDAP Search Temporary Have No Connection To Some Of The Domains Then The Objects From That Domains Are Filtered. Another Known Issue Is When The Specified Global Catalog Server Is Very Remote From Some Of The Domains The Results Are Reverted Extremely Slow. </para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.Object[]]$arrSearchResults = Search-SnsAdObject -LdapQuery $ldapQuery -DcSearch ` -DomainController "server1.contoso.com" -SearchRoot "DC=contoso,DC=com"; </code> <para> Run LDAP Query Against The Domain Partition Of Specified Domain Controller With Specified SearchRoot. </para> <para></para> </example> <example> <code> [System.Object[]]$arrSearchResults = Search-SnsAdObject -LdapQuery $ldapQuery -DcSearch ` -DomainController "server1.contoso.com"; </code> <para> Run LDAP Query Against The Domain Partition Of Specified Domain Controller Against The Current Domain. </para> <para></para> </example> <example> <code> [System.Object[]]$arrSearchResults = Search-SnsAdObject -LdapQuery $ldapQuery -DcSearch ` -SearchRoot "DC=contoso,DC=com"; </code> <para> Run LDAP Query Against The Domain Partition Of Random Domain Controller With Specified SearchRoot. </para> <para></para> </example> <example> <code> [System.Object[]]$arrSearchResults = Search-SnsAdObject -LdapQuery $ldapQuery -DcSearch; </code> <para> Run LDAP Query Against The Domain Partition Of Random Domain Controller Against The Current Domain. </para> <para></para> </example> <example> <code> [System.Object[]]$arrSearchResults = Search-SnsAdObject -LdapQuery $ldapQuery -GcSearch ` -DomainController "server1.contoso.com"; </code> <para> Run LDAP Query Against The Global Partition Of Specified Domain Controller. </para> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SearchSnsAdObject.LdapQuery"> <summary> <para type="description">Specifies A LDAP Query.</para> <para type="description">The Query Must Comply With The Official Microsoft Recommendations https://bit.ly/2RFdUr2 </para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.SearchRoot"> <summary> <para type="description">Specifies A Root For The LDAP Search.</para> <para type="description">For SearchRoot Can Be Provided Either Domains, Organizational Units Or Containers.</para> <para type="description">When Omitted The LDAP Query Will Be Run Against The Current Domain.</para> <para type="description">As SearchRoot Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid" Not Applicable When The Search Root Is Organizational Unit Or Container</para> <para type="description">"AdsPath"</para> <para type="description"> Whenever The CmdLet Will Be Used To Search Withing Different AD Domains In Multi Domain Forest, Is Preferred To Be Used Multiple "AdsPath" With Included Domain Controllers From The Corresponding Domains. </para> <para type="description">For Example:</para> <para type="description">-SearchRoot `</para> <para type="description">@(</para> <para type="description">"LDAP://DC01.Contoso.com/DC=Contoso,DC=com",</para> <para type="description">"LDAP://DC01.Fabricam.Contoso.com/DC=Fabricam,DC=Contoso,DC=com"</para> <para type="description">)</para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted Have To Be Considered Any Delays Caused By The Active Directory Replication.</para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.GcSearch"> <summary> <para type="description">Specifies To The CmdLet To Execute Provided LDAP Query Against The Global Catalog Partition.</para> <para type="description"> To Avoid Unexpected Results Please Make Sure That The LDAP Query Does Not Use Attributes Not Present In The Global Catalog Partition. In Multi Domain Forest Whenever Is Need To Be Used LDAP Query With Attributes Not Present In The Global Catalog Partition The Query Shall Be Run Against The Domain Partitions On All The Domains Within The Forest. In Single Domain Forest There Is No Point Of Using Global Catalog Search At All. </para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.DcSearch"> <summary> <para type="description">Specifies To The CmdLet To Execute Provided LDAP Query Against The Domain Partition.</para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.ReturnProperties"> <summary> <para type="description">Specifies Which AD Properties Will Be Included In The Output Search Object.</para> <para type="description">!!! Use It With Extra Care !!!</para> </summary> </member> <member name="P:SnsPsModule.SearchSnsAdObject.ResultSize"> <summary> <para type="description">Specifies A Maximum Number Of Object That AD Search Reverts.</para> <para type="description">The Restrictions From AD Side Are From 1 To 1000.</para> <para type="description">If Omitted Will Be Used The Active Directory Default Threshold.</para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdBooleanAttribute"> <summary> <para type="synopsis">Sets The Specified Boolean Value In Specified AD Attribute Of Specified AD Object.</para> <para type="description">Sets The Specified Boolean Value In Specified AD Attribute Of Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdBoolean]$objResult = Set-SnsAdBooleanAttribute ` -DistinguishedName "CN=Group01,OU=Groups,DC=contoso,DC=com" ` -Attribute "msExchHideFromAddressLists" -Value $true; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdBooleanAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdBooleanAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdBooleanAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdBooleanAttribute.Value"> <summary> <para type="description">Specifies The Value Which Have To Be Set On The Specified AD Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdBooleanAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdByteAttribute"> <summary> <para type="synopsis">Sets The Specified Byte[] Value In Specified AD Attribute Of Specified AD Object.</para> <para type="description">Sets The Specified Byte[] Value In Specified AD Attribute Of Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdByte]$objResult = Set-SnsAdByteAttribute ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" -Attribute "mS-DS-ConsistencyGuid" ` -Value ([GUID]"6546398f-6416-4ac7-9857-9a3a2914edf1").ToByteArray(); </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdByteAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdByteAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdByteAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdByteAttribute.Value"> <summary> <para type="description">Specifies The Value Which Have To Be Set On The Specified AD Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdByteAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute"> <summary> <para type="synopsis">Sets The Specified Int64 Value On Specified AD Attribute Of Specified AD Object.</para> <para type="description">Sets The Specified Int64 Value On Specified AD Attribute Of Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdIadsiLargeInteger]$objResult = Set-SnsAdIadsiLargeIntegerAttribute ` -DistinguishedName "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -Attribute "msExchRecipientTypeDetails" -Value 2147483648; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute.Value"> <summary> <para type="description">Specifies The Value Which Have To Be Set On The Specified AD Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdIadsiLargeIntegerAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdInt32Attribute"> <summary> <para type="synopsis">Sets The Specified Int32 Value On Specified AD Attribute Of Specified AD Object.</para> <para type="description">Sets The Specified Int32 Value On Specified AD Attribute Of Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdInt32]$objResult = Set-SnsAdInt32Attribute ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" -Attribute "userAccountControl" -Value 512; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdInt32Attribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdInt32Attribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdInt32Attribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdInt32Attribute.Value"> <summary> <para type="description">Specifies The Value Which Have To Be Set On The Specified AD Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdInt32Attribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdMultiValuedStringAttribute"> <summary> <para type="synopsis">Sets The Specified Values On AD Object Multi Valued String Attribute While Removing Any Existing Values.</para> <para type="description">Sets The Specified Values On AD Object Multi Valued String Attribute While Removing Any Existing Values.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdMultiValuedString]$objResult = Set-SnsAdMultiValuedStringAttribute ` -Identity "CN=Group01,OU=Groups,DC=contoso,DC=com" -Attribute "msExchExtensionCustomAttribute1" ` -Value "TestValue01", "TestValue02"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdMultiValuedStringAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdMultiValuedStringAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdMultiValuedStringAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Name Of The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> <para type="description"> Although The CmdLet Can Be Used To Set Values In Any Multi Valued String Attribute. It Is Not Good Idea To Be Used For Modifying Group Members. The Active Directory Have A Limitation Related With The Reverted Number Of Values Within An Attribute. Therefore If The Group Members Are Above The Threshold The Verification Will Fail Because The Member Will Be Not Among The Reverted Results. For That Purpose Is Preferable To Be Used The CmdLets With Noun SnsAdGroupMember From This Module. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdMultiValuedStringAttribute.Value"> <summary> <para type="description">Specifies The Values Which Have To Be Set On The Specified Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdMultiValuedStringAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdProtectFromAccidentalDeletion"> <summary> <para type="synopsis">Sets "Protect object from accidental deletion" Flag On Specified AD Objects.</para> <para type="description">Sets "Protect object from accidental deletion" Flag On Specified AD Objects.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdProtectFromAccidentalDeletion]$objResult = Set-SnsAdProtectFromAccidentalDeletion ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com"; </code> <para></para> </example> <example> <code> [SnsPsModule.SnsAdProtectFromAccidentalDeletion]$objResult = Set-SnsAdProtectFromAccidentalDeletion ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com" -Unprotect; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdProtectFromAccidentalDeletion.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> <para type="description"> Whenever The CmdLet Will Be Used To Modify Multiple User Accounts In Different AD Domains In Multi Domain Forest, Must Be Used "AdsPath" With Included Domain Controller From The Domain Where The Object Is Located. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdProtectFromAccidentalDeletion.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdProtectFromAccidentalDeletion.Unprotect"> <summary> <para type="description">Specifies To Remove "Protect object from accidental deletion" Flag.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdProtectFromAccidentalDeletion.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdUserMustChangePassword"> <summary> <para type="synopsis">Sets "The user must change password at next logon" Flag On Specified Active Directory Account.</para> <para type="description">Sets "The user must change password at next logon" Flag On Specified Active Directory Account.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdUsrMustChangePass]$objResult = Set-SnsAdUserMustChangePassword ` -InputObject "CN=John Smith,OU=Users,DC=contoso,DC=com"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdUserMustChangePassword.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> <para type="description"> Whenever The CmdLet Will Be Used To Modify Multiple User Accounts In Different AD Domains In Multi Domain Forest, Must Be Used "AdsPath" With Included Domain Controller From The Domain Where The Object Is Located. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdUserMustChangePassword.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdUserMustChangePassword.Unset"> <summary> <para type="description">Specifies To Remove "The user must change password at next logon" Flag.</para> <para type="description">Use It With Consciousness.</para> <para type="description">If You Have Rights To Do So, Most Probably You'll Be Responsible This To Never Happens.</para> <para type="description">At Least You'll Be Aware Of The Consequences.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdUserMustChangePassword.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> <member name="T:SnsPsModule.SetRegistry"> <summary> <para type="synopsis">Modifies Or Creates Registry Key Values.</para> <para type="description">Modifies Or Creates Registry Key Values.</para> <para type="description">The CmdLet Requires The Run Space To Be Executed In Elevated Mode.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [System.Boolean[]]$bolSetRegistry = Set-Registry ` -RegistryPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client' ` -RegistryName 'AllowBasic' -RegistryType 'DWord' -RegistryValue 1; </code> <para></para> </example> <example> <code> [System.Object[]]$objObject = Set-Registry ` -RegistryPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client' ` -RegistryName 'AllowBasic' -RegistryType 'DWord' -RegistryValue 1 -PassThru; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetRegistry.RegistryPath"> <summary> <para type="description">Specifies The Full Absolute UNC Registry Path.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.RegistryName"> <summary> <para type="description">Specifies The Name Of The Registry Key.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.RegistryType"> <summary> <para type="description">Specifies The Type Of The Registry Key.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.RegistryValue"> <summary> <para type="description">Specifies The Value Of The Registry Key.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.Attempts"> <summary> <para type="description">Specifies The Number Of Attempts That The CmdLet Have To Make Before To Consider The Fulfilment As Failed.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.Force"> <summary> <para type="description">Forces The CmdLet To Create The Registry Key Value In Case Does Not Exist.</para> </summary> </member> <member name="P:SnsPsModule.SetRegistry.PassThru"> <summary> <para type="description">Specify The Parameter Whenever You Need The Function To Revert Output Object.</para> </summary> </member> <member name="T:SnsPsModule.SetSnsAdStringAttribute"> <summary> <para type="synopsis">Sets The Specified String Value In Specified AD Attribute Of Specified AD Object.</para> <para type="description">Sets The Specified String Value In Specified AD Attribute Of Specified AD Object.</para> <list type="alertSet"> <item> <term> </term> <description> <para>AUTHOR: Svetoslav Nedyalkov Savov</para> <para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</para> <para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</para> <para></para> <para></para> <para></para> </description> </item> </list> <example> <code> [SnsPsModule.SnsAdString]$objResult = Set-SnsAdStringAttribute ` -Identity "CN=John Smith,OU=Users,DC=contoso,DC=com" ` -Attribute "extensionAttribute1" -Value "Test"; </code> <para></para> </example> </summary> <para type="link" uri="https://github.com/svesavov/SnsPsModule"> svesavov / SnsPsModule - </para> <para type="link" uri="https://www.powershellgallery.com/packages/SnsPsModule/"> PowerShell Gallery - </para> <para type="link" uri="https://www.linkedin.com/in/svetoslavsavov"> Svetoslav Savov on LinkedIn - </para> </member> <member name="P:SnsPsModule.SetSnsAdStringAttribute.Identity"> <summary> <para type="description">Specifies The Identity Of An Active Directory Object To Be Modified.</para> <para type="description">As Identity Can Be Used The Value In One Of The Following AD Attributes:</para> <para type="description">"DistinguishedName"</para> <para type="description">"objectGUID"</para> <para type="description">"objectSid"</para> <para type="description">"AdsPath"</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdStringAttribute.DomainController"> <summary> <para type="description">Specifies A Domain Controller Fully Qualified Domain Name.</para> <para type="description">If Omitted The CmdLet Will Run Against The Logon Server.</para> <para type="description">This Prevents Issues Related With AD Replication.</para> <para type="description"> In Multi Domain Forests Specifying Of Domain Controller Responsible For The AD Domain Where The AD Objects Are Located Is Required. </para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdStringAttribute.Attribute"> <summary> <para type="description">Specifies The Attribute Which Have To Be Set As It Is Shown In ADSIEdit.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdStringAttribute.Value"> <summary> <para type="description">Specifies The Value Which Have To Be Set On The Specified AD Attribute.</para> </summary> </member> <member name="P:SnsPsModule.SetSnsAdStringAttribute.Attempts"> <summary> <para type="description"> Specifies The Number Of Attempts That Have To Be Made To Set The Specified Values To The Specified AD Attribute. </para> </summary> </member> </members> </doc> |