Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. markdmac

    How to get a Document URL via PowerShell & SharePoint Online

    I have roughly 1000 files located in SharePoint that I need to query to produce a report of file name and the URL for the file. We are using SharePoint Online and I have been testing with the PNP model. My company has 2 Factor Authentication enabled, so I need to use the -UseWebLogin method to...
  2. markdmac

    SharePoint 2010 - can one site have multiple reservation/resource calendars

    Yes, you can have multiple calendars in a site. I am just getting back into SharePoint coding myself, but have done this years back. As I recall it required adding a second WebPart. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant...
  3. markdmac

    Need a way to script powershell select-string pattern from multiple subfolders

    Get-ChildItem -File -Recurse | Select-string "897-2" .\*xls | select -u -exp filename I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced. Work SMARTER not HARDER.
  4. markdmac

    Help needed to list messages in an Exchange mailbox

    I stand corrected, thanks Frederico. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced. Work SMARTER not HARDER.
  5. markdmac

    Windows Server 2012 Security Log Backups targeting Servers in a specific OU

    You can target a specific OU and OS type rather easily like this: Get-ADComputer -Properties * -Filter "OperatingSystem -like '*Server*'" -SearchBase "OU=IT, DC=contoso, DC=com" | Select Name, OperatingSystem You can also get the event log info easily with PowerShell rather than using the WMI...
  6. markdmac

    How to encrypt a text file with PowerShell

    Thanks Frederico, I had found that same script and article but couldn't get it to work for my needs. I am able to protect a file, but can't figure out a means to read the encrypted data and unencrypt it in the script without reversing the encryption in the file on disk. The situation requires...
  7. markdmac

    Help needed to list messages in an Exchange mailbox

    Exchange doesn't give you that level of access on the mailbox. You will need to script using Outlook. here is a link that has sample code to list emails in a mailbox. https://community.spiceworks.com/topic/372093-script-to-extract-all-senders-and-subjects-of-messages-in-a-specified-mailbox I...
  8. markdmac

    How to encrypt a text file with PowerShell

    I have written a script that is used for disk cleanup on a file server. The script looks at user shares, checks with AD to see if the account is disabled and if so checks if the user login exists in a text file that indicates who is on litigation hold. If the account is disabled and not on...
  9. markdmac

    WMI Class and Properties Utility

    I noticed that Microsoft took down their link for PowerShell Scriptomatic. I primarily used to use that just to identify properties in a WMI class. So I made the following to replace that utility. #========================================================================== # # NAME...
  10. markdmac

    I would like ask for the little assistance relating to POWERSHELL-Request for help

    Your best friend is the built in help within PowerShell. Use Get-Command to see a list of commands that are available. Use Get-Help COMMAND to see what can be done. Learn to read the context of the help. Items in square brackets [] are optional. Note that there are sometimes different...
  11. markdmac

    -Newbie- Renaming folders and subfolders with files count

    Here you go, this does what you requested for a single folder. Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder("C:\Test\") FileCount = objFolder.Files.Count objFSO.MoveFolder objFolder.Path, objFolder.Path & FileCount I hope that helps. Regards...
  12. markdmac

    Delete User from Domain + Extras

    I doubt you are going to get anyone to rewrite your code for you. I can however offer some suggestions. First, break this down into the items you outline above. Handle the user folders before you remove the account, that way you don't have a bad sid associated with the files. Use extensive...
  13. markdmac

    How do I include dropdown options in some entry fields of this form?

    It has to go in the body. I would recommend you download HTAOmatic from Microsoft. It will help you build this out. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced. Check out my...
  14. markdmac

    How do I include dropdown options in some entry fields of this form?

    <select size="1" name="OptionChooser" onChange="TestSub"> <option value="0"></option> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> </select> I hope that helps. Regards, Mark No trees were harmed in posting this message...
  15. markdmac

    Remove a Security Group from all Users in a OU

    Fairly simple to do. First enumerate the users in the OU to create a list of users. Then script the removal of that user from the members list of the Group. Does that lead you to your answer sufficiently? I hope that helps. Regards, Mark No trees were harmed in posting this message...
  16. markdmac

    Reed XML Nodes With VBScript

    I would recommend you try using PowerShell instead. It has built in cmdlets for reading XML. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced. Check out my scripting solutions at...
  17. markdmac

    Error Deleting Profiles On Remote Server

    if (!$skip) { $path = $user.localpath write-host $path -foregroundcolor "DarkYellow" [highlight #FCE94F]Remove-Item $path[/highlight] } This will remove the directory, however you will still have the issue of the registry keys existing. I hope that helps. Regards, Mark...
  18. markdmac

    Help With Login Script

    Here is how to enter a password using IE as the means to mask the characters. strPw = GetPassword( "Please enter Admin password:" ) WScript.Echo "Your password is: " & strPw Function GetPassword( myPrompt ) Set objIE = CreateObject( "InternetExplorer.Application" ) objIE.Navigate...
  19. markdmac

    Help With Login Script

    Another option is to simply use PowerShell which has the Get-Cred cmdlet for doing this exact task. Should you want to try that I can help with code int he PowerShell forum. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of...
  20. markdmac

    Help With Login Script

    To mask the password you can use Internet Explorer. There are a ton of samples out there if you google vbscript password prompt InternetExplorer. I hope that helps. Regards, Mark No trees were harmed in posting this message, however a significant number of electrons were terribly...

Part and Inventory Search

Back
Top