Skip to content
Permalink
Browse files

Add notes and edit title

  • Loading branch information...
dnewsholme committed Jun 14, 2019
1 parent eeea671 commit 3e6f29baee18cdfe48de3b576a88ad25e8831ef1
Showing with 1 addition and 1 deletion.
  1. +1 −1 Dynamic Folder/PasswordState/PasswordState.rdfe
@@ -1 +1 @@
{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"PasswordState","Notes":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>\n\t\t</title>\n\t\t<style type=\"text/css\">\n\t\t\t.cs2654AE3A{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt}\n\t\t\t.cs23FB0664{color:#000000;background-color:transparent;font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<p class=\"cs2654AE3A\"><span class=\"cs23FB0664\">&nbsp;</span></p></body>\n</html>\n","ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"json","Script":"$ErrorActionPreference = \"Stop\"\n$results = Get-PasswordStateResource -uri \"/api/searchpasswords/?search=%&PreventAuditing=true\"\n$credentials = @()\nforeach ($item in $results) {\n if ($item.Notes -like \"-----BEGIN RSA PRIVATE KEY----*\") {\n $credentials += [pscustomobject]@{\n Type = \"Credential\"\n Name = $item.Title\n Username = $item.Username\n Password = $item.Password\n ID = $item.PasswordID\n KeyFileContent = $item.Notes\n }\n \n }\n else {\n $credentials += [pscustomobject]@{\n Type = \"Credential\"\n Name = $item.Title\n Username = $item.Username\n Password = $item.Password\n ID = $item.PasswordID\n }\n \n }\n}\n\n\n$final = [pscustomobject]@{\n Objects = $credentials\n}\n$final | ConvertTo-Json -Depth 100 | Write-Output"}]}
{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"PasswordState","Description":"Powershell Core Compatible with Windows/Mac","Notes":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n\t<head>\r\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>\r\n\t\t</title>\r\n\t\t<style type=\"text/css\">\r\n\t\t\t.csD0B8C370{text-align:left;text-indent:0pt;margin:0pt 0pt 12pt 0pt;line-height:1.25;background-color:#FFFFFF}\r\n\t\t\t.csBCDCB899{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:24pt;font-weight:bold;font-style:normal;}\r\n\t\t\t.cs347409B9{text-align:left;text-indent:0pt;margin:18pt 0pt 12pt 0pt;line-height:1.25;background-color:#FFFFFF}\r\n\t\t\t.cs7A1E18A6{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:18pt;font-weight:bold;font-style:normal;}\r\n\t\t\t.cs390BE685{text-align:left;text-indent:0pt;margin:0pt 0pt 12pt 0pt;background-color:#FFFFFF}\r\n\t\t\t.cs1D660B88{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:12pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.csEA2B763F{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:12pt;font-weight:normal;font-style:normal;text-decoration: none;}\r\n\t\t\t.cs5B2346F0{color:#0366D6;background-color:transparent;font-family:'Microsoft Sans Serif';font-size:12pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.cs466134BF{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:15pt;font-weight:bold;font-style:normal;}\r\n\t\t\t.csF6ACB358{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:12pt;font-weight:bold;font-style:normal;}\r\n\t\t\t.cs414B56E{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;line-height:1.45;background-color:#F6F8FA}\r\n\t\t\t.csEB988145{color:#24292E;background-color:#F6F8FA;font-family:'Microsoft Sans Serif';font-size:10pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.cs78C0E5E3{color:#005CC5;background-color:#F6F8FA;font-family:'Microsoft Sans Serif';font-size:10pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.cs7C305633{color:#D73A49;background-color:#F6F8FA;font-family:'Microsoft Sans Serif';font-size:10pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.cs8AE65948{color:#032F62;background-color:#F6F8FA;font-family:'Microsoft Sans Serif';font-size:10pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.cs387CAFD2{color:#24292E;background-color:#FFFFFF;font-family:'Microsoft Sans Serif';font-size:10pt;font-weight:normal;font-style:normal;}\r\n\t\t\t.csE77A638E{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;background-color:#FFFFFF}\r\n\t\t\t.cs2654AE3A{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt}\r\n\t\t\t.cs23FB0664{color:#000000;background-color:transparent;font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;}\r\n\t\t</style>\r\n\t</head>\r\n\t<body>\r\n\t\t<h1 class=\"csD0B8C370\">\r\n\t\t\t<a name=\"_dx_frag_StartFragment\"></a><span class=\"csBCDCB899\">Password State Dynamic Folder</span></h1>\r\n\t\t<h2 class=\"cs347409B9\">\r\n\t\t\t<span class=\"cs7A1E18A6\">How to use</span></h2>\r\n\t\t<p class=\"cs390BE685\"><span class=\"cs1D660B88\">Install passwordstate-management powershell module&nbsp;<a class=\"csEA2B763F\" href=\"https://www.powershellgallery.com/packages/passwordstate-management/\"><span class=\"cs5B2346F0\">PSGalleryLink</span></a></span></p><h3 class=\"cs347409B9\">\r\n\t\t\t<span class=\"cs466134BF\">Setup your passwordstate management environment</span></h3>\r\n\t\t<p class=\"cs390BE685\"><span class=\"cs1D660B88\">First you will need to setup the environment for PasswordState. This prevents you having to enter the api key all the time as it&#39;s stored in an encrypted format. Or you can use Windows authentication using the currently logged on user.</span></p><h4 class=\"cs347409B9\">\r\n\t\t\t<span class=\"csF6ACB358\">For API Key</span></h4>\r\n\t\t<p class=\"cs414B56E\"><span class=\"csEB988145\">&nbsp; &nbsp;&nbsp;</span><span class=\"cs78C0E5E3\">Set-PasswordStateEnvironment</span><span class=\"csEB988145\"> &nbsp;</span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">baseuri </span><span class=\"cs8AE65948\">&quot;https://passwordstatserver.co.uk&quot;</span><span class=\"csEB988145\"> </span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">apikey </span><span class=\"cs8AE65948\">&quot;dsiwjdi9e0377dw84w45dsw5sw&quot;</span></p><h4 class=\"cs347409B9\">\r\n\t\t\t<span class=\"csF6ACB358\">For Windows Auth With Pass Through Authentication</span></h4>\r\n\t\t<p class=\"cs414B56E\"><span class=\"csEB988145\">&nbsp; &nbsp;&nbsp;</span><span class=\"cs78C0E5E3\">Set-PasswordStateEnvironment</span><span class=\"csEB988145\"> &nbsp;</span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">baseuri </span><span class=\"cs8AE65948\">&quot;https://passwordstateserver.co.uk&quot;</span><span class=\"csEB988145\"> </span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">WindowsAuthOnly</span></p><h4 class=\"cs347409B9\">\r\n\t\t\t<span class=\"csF6ACB358\">For Windows Auth With Custom Credentials</span></h4>\r\n\t\t<p class=\"cs414B56E\"><span class=\"csEB988145\">&nbsp; &nbsp;&nbsp;</span><span class=\"cs78C0E5E3\">Set-PasswordStateEnvironment</span><span class=\"csEB988145\"> &nbsp;</span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">baseuri </span><span class=\"cs8AE65948\">&quot;https://passwordstateserver.co.uk&quot;</span><span class=\"csEB988145\"> </span><span class=\"cs7C305633\">-</span><span class=\"csEB988145\">customcredentials $(</span><span class=\"cs78C0E5E3\">Get-Credential</span><span class=\"csEB988145\">)</span></p><p class=\"cs390BE685\"><span class=\"cs1D660B88\">This will save a file called&nbsp;</span><span class=\"cs387CAFD2\">passwordstate.json</span><span class=\"cs1D660B88\">&nbsp;under the users profile folder.</span></p><p class=\"csE77A638E\"><span class=\"cs1D660B88\">For more infor about the module consult powershell help or the&nbsp;<a class=\"csEA2B763F\" href=\"https://github.com/dnewsholme/PasswordState-Management\"><span class=\"cs5B2346F0\">github repository</span></a></span><a name=\"_dx_frag_EndFragment\"></a></p><p class=\"cs2654AE3A\"><span class=\"cs23FB0664\">&nbsp;</span></p></body>\r\n</html>\r\n","ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"json","Script":"$ErrorActionPreference = \"Stop\"\r\n$results = Get-PasswordStateResource -uri \"/api/searchpasswords/?search=%&PreventAuditing=true\"\r\n$credentials = @()\r\nforeach ($item in $results) {\r\n if ($item.Notes -like \"-----BEGIN RSA PRIVATE KEY----*\") {\r\n $credentials += [pscustomobject]@{\r\n Type = \"Credential\"\r\n Name = $item.Title\r\n Username = $item.Username\r\n Password = $item.Password\r\n ID = $item.PasswordID\r\n KeyFileContent = $item.Notes\r\n }\r\n \r\n }\r\n else {\r\n $credentials += [pscustomobject]@{\r\n Type = \"Credential\"\r\n Name = $item.Title\r\n Username = $item.Username\r\n Password = $item.Password\r\n ID = $item.PasswordID\r\n }\r\n \r\n }\r\n}\r\n\r\n\r\n$final = [pscustomobject]@{\r\n Objects = $credentials\r\n}\r\n$final | ConvertTo-Json -Depth 100 | Write-Output"}]}

0 comments on commit 3e6f29b

Please sign in to comment.
You can’t perform that action at this time.