Posts

Outlook "Work Offline" Mode

 Since I've mainly only found this in terms of a VB Script. I'm going to post my version of it in PowerShell for anyone who is looking for something similar.  1: #Check if Outlook is online or offline mode 2: $Outlook = New-Object -ComObject Outlook.Application; 3: $State = if ($outlook.session.offline) {"Outlook has been set to work offline mode." } else { "Healthy - Outlook is in online mode." }; 4: $State; 5: 6: 7: #Toggle Outlook to online mode 8: Try { 9: $Outlook = New-Object -ComObject Outlook.Application 10: $State = "Toggle" 11: if ($outlook.session.offline) 12: { 13: $Outlook.ActiveExplorer().CommandBars.ExecuteMSO("ToggleOnline") 14: } 15: else 16: { 17: "Outlook already in online mode." 18: } 19: ConvertTo-Json($State) 20: } 21: Catch 22: { 23: If ($_.Exception.Message.Contains("Class not registered")) 2...

NFT

 Just started dabbling in NFT creation. Feel free to check out what I'm working on (items in collection may vary) https://opensea.io/collection/photography-memories

Pfsense Multi-Lan Simple

Image
 Greetings Folks! It's been a while since I've created a blog post. I recently stood up a Pfsense VM to setup a lab environment. I added a second virtual nic to connect to a separate physical network that would be an extension of the VM lab network. Yes I know I could just make the VM lab network extend to the physical but I wanted to have some easy isolation like bits. Plus get some experience on how to configure the virtual switches. There's lots of different references on how to allow traffic from LAN1 to OPTx and vice versa all over the internet. The simplest was the hardest to really find. So I'm putting here for easy reference. Any to Any rules on LAN1 and OPTx Firewalls

MEMCM Console Extension Node GUID

Recently needed to add some custom console extensions to some new nodes in the CM Console. Found this blog that was extremely useful for figuring out what the guid is for each item in the console. http://brunocm.azurewebsites.net/part-1-a-simple-xml-extension-file/

Enable User Policy for Terminal Servers CM 1906

Image
We found an issue where our Citrix Admins couldn't install software from software center or application catalog. Found the client was refusing user policy. After some digging we found that user policy is disabled by default in 1906 and no GUI way to flip it until CM 1910. You can confirm this with the following sql command. You will have to open the resulting xml blob to view. SELECT SiteControl FROM vSMS_SC_SiteControlXML WHERE SiteCode = 'SiteCode' To make the change to policy you have to make the update via wbemtest and it will be apply to all setting. This becomes a regular client policy setting in 1910. Wbemtest Connect to your site server namespace Enum Instances = SMS_SCI_ClientComp Select “Software Distribution” Open “Props” View Embedded Last one in list Open Verify “Request User Policy On TS” Open “Value” Change to “1 (0x1)” Save object on all dialogs Verify the change via the same SQL from the beginning. SELECT SiteControl FROM vSMS_SC...

DP Content Location Request Powershell

If you ever need to see the DP location list coming from SCCM MP to a client. Here is a nifty script that will let you put in the information and see what it returns. Basically synthetic MP calls for DP Content List. [void] [Reflection.Assembly]::LoadWithPartialName("System.Diagnostics") [void] [Reflection.Assembly]::LoadFile("c:\Microsoft.ConfigurationManagement.Messaging.dll") $ManagementPointSiteCode = "COP" $ManagementPoint = "Server.FQDN.local" $PackageID = "PackageID" $PackageVersion = "PackageVersion" $myDomain = "Domain.Whatever" $myForest = "Forest" $myCustomAdSite = "ADSite" # Set up the objects $httpSender = New-Object -TypeName Microsoft.ConfigurationManagement.Messaging.Sender.Http.HttpSender $clr = New-Object -TypeName Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrContentLocationRequest $cmReply = New-Object -TypeName Microsoft.ConfigurationManage...

Move and Resize BranchCache Hash/Data Cache on Distribution Point

This one is pretty self explanatory. If you use BranchCache by default it puts the caches on C: drive and you might find that your C: is the smallest drive (depending on your server configuration). Anyways here is something that will help you move those caches around and set them to a different size. #Check if cache already moved $CacheStatus = Get-BCStatus If(($CacheStatus.HashCache.CacheFileDirectoryPath -like 'E:\')-or($CacheStatus.DataCache.CacheFileDirectoryPath -like 'E:\')) {     Set-BCDataCacheEntryMaxAge -TimeDays 10     Return "Already Moved" } elseif ((Get-Volume -DriveLetter E).FileSystem -ne "NTFS") {     # Set Cache Sizes     get-bchashcache | set-bccache -Percentage 2 -Force -Confirm:$false     get-bcdatacache | set-bccache -Percentage 1 -Force -Confirm:$false     Set-BCDataCacheEntryMaxAge -TimeDays 10     Return "Destination Not NTFS" } else {     #Create New Directories ...